<commit_before>#! /usr/bin/python
"""Distutils-based setup script for trajectory file reading modules.

A working installation of NumPy <http://numpy.scipy.org> is required.

For a basic installation just type the command::

    python setup.py build_ext --inplace

Based on setup.py from MDAnalysis:

    http://code.google.com/p/mdanalysis/

"""


from distutils.core import setup, Extension

# Obtain the numpy include directory.  This logic works across numpy versions.
import numpy
try:
    numpy_include = numpy.get_include()
except AttributeError:
    numpy_include = numpy.get_numpy_include()

include_dirs = [ numpy_include ]

# Needed for large-file seeking under 32bit systems (for xtc/trr indexing and access).
largefile_macros = [
    ( '_LARGEFILE_SOURCE', None ),
    ( '_LARGEFILE64_SOURCE', None ),
    ( '_FILE_OFFSET_BITS','64' )
]

if __name__ == '__main__':
    setup(
        ext_modules = [
            Extension(
                'xdrfile._libxdrfile2',
                sources = [
                    'xdrfile/libxdrfile2_wrap.c',
                    'xdrfile/xdrfile.c',
                    'xdrfile/xdrfile_trr.c',
                    'xdrfile/xdrfile_xtc.c'
                ],
                include_dirs = include_dirs,
                define_macros = largefile_macros
            ),
            Extension(
                'dcd._dcdmodule',
                sources = [
                    'dcd/dcd.c'
                ],
                include_dirs = include_dirs + [ 'dcd/include' ],
            ),
        ],
    )
<commit_msg>CODE: simplified setup.py<commit_after>#! /usr/bin/python
"""Distutils-based setup script for trajectory file reading modules.

A working installation of NumPy <http://numpy.scipy.org> is required.

For a basic installation just type the command::

    python setup.py build_ext --inplace

Based on setup.py from MDAnalysis:

    http://code.google.com/p/mdanalysis/

"""


from distutils.core import setup, Extension
import numpy.distutils.misc_util

include_dirs = [
    numpy.distutils.misc_util.get_numpy_include_dirs()
]

# Needed for large-file seeking under 32bit systems (for xtc/trr indexing and access).
largefile_macros = [
    ( '_LARGEFILE_SOURCE', None ),
    ( '_LARGEFILE64_SOURCE', None ),
    ( '_FILE_OFFSET_BITS','64' )
]

if __name__ == '__main__':
    setup(
        ext_modules = [
            Extension(
                'xdrfile._libxdrfile2',
                sources = [
                    'xdrfile/libxdrfile2_wrap.c',
                    'xdrfile/xdrfile.c',
                    'xdrfile/xdrfile_trr.c',
                    'xdrfile/xdrfile_xtc.c'
                ],
                include_dirs = include_dirs,
                define_macros = largefile_macros
            ),
            Extension(
                'dcd._dcdmodule',
                sources = [
                    'dcd/dcd.c'
                ],
                include_dirs = include_dirs + [ 'dcd/include' ],
            ),
        ],
    )

{'fraction_non_alphanumeric': 0.1001669449081803, 'fraction_numerical': 0.005342237061769616, 'mean_word_length': 1.8371212121212122, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '595785', 'n_tokens_mistral': 952, 'n_tokens_neox': 898, 'n_words': 192}