<commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages, Extension  # This setup relies on setuptools since distutils is insufficient and badly hacked code
import numpy as np
from distutils.command.build_ext import build_ext
from Cython.Build import cythonize
import os

version = 0.1

copt = {'msvc': ['-Itestbeam_analysis/clusterizer/external', '/EHsc']}  # set additional include path and EHsc exception handling for VS
lopt = {}


class build_ext_opt(build_ext):
    def initialize_options(self):
        build_ext.initialize_options(self)
        self.compiler = 'msvc' if os.name == 'nt' else None  # in Miniconda the libpython package includes the MinGW import libraries and a file (Lib/distutils/distutils.cfg) which sets the default compiler to mingw32. Alternatively try conda remove libpython.

    def build_extensions(self):
        c = self.compiler.compiler_type
        if c in copt:
            for e in self.extensions:
                e.extra_compile_args = copt[c]
        if c in lopt:
            for e in self.extensions:
                e.extra_link_args = lopt[c]
        build_ext.build_extensions(self)

cpp_extension = cythonize([
    Extension('testbeam_analysis.analysis_functions', ['testbeam_analysis/cpp/analysis_functions.pyx'])
])

author = '<NAME>, <NAME>'
author_email = '<EMAIL>, <EMAIL>'

# requirements for core functionality from requirements.txt
with open('requirements.txt') as f:
    install_requires = f.read().splitlines()

setup(
    name='testbeam_analysis',
    version=version,
    description='A light weight test beam analysis in Python and C++.',
    url='https://github.com/SiLab-Bonn/testbeam_analysis',
    license='BSD 3-Clause ("BSD New" or "BSD Simplified") License',
    long_description='A very simple analysis of pixel-sensor data from testbeams. All steps of a full analysis are included in one file in < 1500 lines of Python code. If you you want to do simple straight line fits without a Kalman filter or you want to understand the basics of telescope reconstruction this code might help. If you want to have something fancy to account for thick devices in combination with low energetic beams use e.g. EUTelescope. Depending on the setup a resolution that is only ~ 15% worse can be archieved with this code. For a quick first impression check the example plots in the wiki and run the examples.',
    author=author,
    maintainer=author,
    author_email=author_email,
    maintainer_email=author_email,
    install_requires=install_requires,
    packages=find_packages(),  # exclude=['*.tests', '*.test']),
    include_package_data=True,  # accept all data files and directories matched by MANIFEST.in or found in source control
    package_data={'': ['*.txt', 'VERSION'], 'docs': ['*'], 'examples': ['*']},
    ext_modules=cpp_extension,
    include_dirs=[np.get_include(), 'testbeam_analysis/cpp/external'],
    cmdclass={'build_ext': build_ext_opt},
    keywords=['testbeam', 'particle', 'reconstruction', 'pixel', 'detector'],
    platforms='any'
)<commit_msg>REG: fix windows include PRJ: add more people who contributed as authors<commit_after>#!/usr/bin/env python
from setuptools import setup, find_packages, Extension  # This setup relies on setuptools since distutils is insufficient and badly hacked code
import numpy as np
from distutils.command.build_ext import build_ext
from Cython.Build import cythonize
import os

version = 0.1

copt = {'msvc': ['-Itestbeam_analysis/cpp/external', '/EHsc']}  # set additional include path and EHsc exception handling for VS
lopt = {}


class build_ext_opt(build_ext):
    def initialize_options(self):
        build_ext.initialize_options(self)
        self.compiler = 'msvc' if os.name == 'nt' else None  # in Miniconda the libpython package includes the MinGW import libraries and a file (Lib/distutils/distutils.cfg) which sets the default compiler to mingw32. Alternatively try conda remove libpython.

    def build_extensions(self):
        c = self.compiler.compiler_type
        if c in copt:
            for e in self.extensions:
                e.extra_compile_args = copt[c]
        if c in lopt:
            for e in self.extensions:
                e.extra_link_args = lopt[c]
        build_ext.build_extensions(self)

cpp_extension = cythonize([
    Extension('testbeam_analysis.analysis_functions', ['testbeam_analysis/cpp/analysis_functions.pyx'])
])

author = '<NAME>, <NAME>, <NAME>, <NAME>'
author_email = '<EMAIL>'

# requirements for core functionality from requirements.txt
with open('requirements.txt') as f:
    install_requires = f.read().splitlines()

setup(
    name='testbeam_analysis',
    version=version,
    description='A light weight test beam analysis in Python and C++.',
    url='https://github.com/SiLab-Bonn/testbeam_analysis',
    license='BSD 3-Clause ("BSD New" or "BSD Simplified") License',
    long_description='A very simple analysis of pixel-sensor data from testbeams. All steps of a full analysis are included in one file in < 1500 lines of Python code. If you you want to do simple straight line fits without a Kalman filter or you want to understand the basics of telescope reconstruction this code might help. If you want to have something fancy to account for thick devices in combination with low energetic beams use e.g. EUTelescope. Depending on the setup a resolution that is only ~ 15% worse can be archieved with this code. For a quick first impression check the example plots in the wiki and run the examples.',
    author=author,
    maintainer=author,
    author_email=author_email,
    maintainer_email=author_email,
    install_requires=install_requires,
    packages=find_packages(),  # exclude=['*.tests', '*.test']),
    include_package_data=True,  # accept all data files and directories matched by MANIFEST.in or found in source control
    package_data={'': ['*.txt', 'VERSION'], 'docs': ['*'], 'examples': ['*']},
    ext_modules=cpp_extension,
    include_dirs=[np.get_include()],
    cmdclass={'build_ext': build_ext_opt},
    keywords=['testbeam', 'particle', 'reconstruction', 'pixel', 'detector'],
    platforms='any'
)
{'fraction_non_alphanumeric': 0.09674267100977199, 'fraction_numerical': 0.0035830618892508143, 'mean_word_length': 4.092039800995025, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 12, 'https://': 2, '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': '579408', 'n_tokens_mistral': 1782, 'n_tokens_neox': 1697, 'n_words': 623}