<commit_before>from distutils.core import setup
from Cython.Distutils import build_ext
from distutils.extension import Extension


import subprocess

def detect_pylon(config_config='/opt/pylon5/bin/pylon-config'):
    compiler_config = dict()
    compiler_config['library_dirs'] = [subprocess.check_output([config_config, '--libdir']).decode().strip(), ]
    compiler_config['include_dirs'] = [_.strip() for _ in
                                       subprocess.check_output([config_config,
                                                                '--cflags-only-I']).decode().strip().split('-I') if _]
    compiler_config['libraries'] = [_.strip() for _ in
                                       subprocess.check_output([config_config,
                                                                '--libs-only-l']).decode().strip().split('-l') if _]
    compiler_config['language'] = 'c++'
    return compiler_config


build_options = detect_pylon()

pypylon_extensions = [Extension('pypylon.cython.version', ['cython/version.pyx', ], **build_options),
                      Extension('pypylon.cython.factory', ['cython/factory.pyx', ], **build_options),
                    ]

setup(name='pypylon',
      license="custom",
      description="Cython module to provide access to Pylon's SDK.",
      version='0.0.1',
      author="<NAME>",
      author_email="<EMAIL>",
      cmdclass={'build_ext': build_ext},
      ext_modules=pypylon_extensions,
      # ext_modules=cythonize('pypylon/*.pyx', language='c++', **detect_pylon()),
      # install_requires=['cython>=0.20.1'],

      )

# for the classifiers review see:<commit_msg>Do not require definition of a special LD_LIBRARY_PATH<commit_after>from distutils.core import setup
from Cython.Distutils import build_ext
from distutils.extension import Extension


import subprocess

def detect_pylon(config_config='/opt/pylon5/bin/pylon-config'):
    compiler_config = dict()
    compiler_config['library_dirs'] = [subprocess.check_output([config_config, '--libdir']).decode().strip(), ]
    compiler_config['include_dirs'] = [_.strip() for _ in
                                       subprocess.check_output([config_config,
                                                                '--cflags-only-I']).decode().strip().split('-I') if _]
    compiler_config['libraries'] = [_.strip() for _ in
                                       subprocess.check_output([config_config,
                                                                '--libs-only-l']).decode().strip().split('-l') if _]
    compiler_config['language'] = 'c++'
    compiler_config['runtime_library_dirs'] = compiler_config['library_dirs']
    return compiler_config


build_options = detect_pylon()

pypylon_extensions = [Extension('pypylon.cython.version', ['cython/version.pyx', ], **build_options),
                      Extension('pypylon.cython.factory', ['cython/factory.pyx', ], **build_options),
                    ]

setup(name='pypylon',
      license="custom",
      description="Cython module to provide access to Pylon's SDK.",
      version='0.0.1',
      author="<NAME>",
      author_email="<EMAIL>",
      cmdclass={'build_ext': build_ext},
      ext_modules=pypylon_extensions,
      # ext_modules=cythonize('pypylon/*.pyx', language='c++', **detect_pylon()),
      # install_requires=['cython>=0.20.1'],

      )

# for the classifiers review see:
{'fraction_non_alphanumeric': 0.143696738172201, 'fraction_numerical': 0.0047017337643255955, 'mean_word_length': 2.4912820512820515, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4831820', 'n_tokens_mistral': 972, 'n_tokens_neox': 949, 'n_words': 154}