<commit_before>from setuptools import setup
from distutils.extension import Extension

setup_requires = [
    'cython>=0.x',
    'pytest-runner',
]

install_requires = [
    'ujson',
]

tests_require = [
    'pytest',
    'pytest-benchmark',
    'hypothesis',
]

extensions = [
    Extension(
        "jsonsubset.deps.xxhash_cython.xxhash",
        [
            'jsonsubset/deps/xxhash_cython/xxhash.pyx',
            'jsonsubset/deps/xxhash_cython/xxHash/xxhash.c'
        ],
        extra_compile_args=["-O3"]
    ),
    Extension(
        "jsonsubset.subset",
        ['jsonsubset/subset.pyx'],
        language='c++',
        extra_compile_args=["-O3"]
    ),
    Extension(
        "jsonsubset.json_parser",
        ['jsonsubset/json_parser.pyx'],
        language='c++',
        extra_compile_args=["-O3"]
    ),
]

setup(
    packages=["jsonsubset"],
    package_data={
        "jsonsubset.deps.xxhash_cython.xxhash": ["jsonsubset/deps/xxhash_cython/xxhash.pxd"],
    },
    package_dir={
        'jsonsubset': 'jsonsubset'
    },
    ext_modules=extensions,
    setup_requires=setup_requires,
    install_requires=install_requires,
    tests_require=tests_require,
)
<commit_msg>[setup.py] Using setuptools' Extension instead of distutils' ...<commit_after>from setuptools import setup
from setuptools.extension import Extension

setup_requires = [
    'cython>=0.x',
    'pytest-runner',
]

install_requires = [
    'ujson',
]

tests_require = [
    'hypothesis',
    'pytest-benchmark',
    'pytest',
]

extensions = [
    Extension(
        "jsonsubset.deps.xxhash_cython.xxhash",
        [
            'jsonsubset/deps/xxhash_cython/xxhash.pyx',
            'jsonsubset/deps/xxhash_cython/xxHash/xxhash.c'
        ],
        extra_compile_args=["-O3"]
    ),
    Extension(
        "jsonsubset.subset",
        ['jsonsubset/subset.pyx'],
        language='c++',
        extra_compile_args=["-O3"]
    ),
    Extension(
        "jsonsubset.json_parser",
        ['jsonsubset/json_parser.pyx'],
        language='c++',
        extra_compile_args=["-O3"]
    ),
]

setup(
    name='jsonsubset',
    version='0.1.0',
    description="Extract and parse specific fields from a JSON string ",
    author="<NAME>",
    keywords='jsonsubset',
    license="MIT license",
    classifiers=[
        'Development Status :: 4 - Beta',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Natural Language :: English',
        'Programming Language :: Cython',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: 3.5',
        'Programming Language :: Python :: 3.6',
    ],

    packages=["jsonsubset"],
    package_data={
    },
    package_dir={
        'jsonsubset': 'jsonsubset'
    },
    ext_modules=extensions,
    setup_requires=setup_requires,
    install_requires=install_requires,
    tests_require=tests_require,
)

{'fraction_non_alphanumeric': 0.14148123546994354, 'fraction_numerical': 0.006974427100631019, 'mean_word_length': 2.6201923076923075, 'pattern_counts': {'":': 1, '<': 4, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '579117', 'n_tokens_mistral': 1033, 'n_tokens_neox': 1017, 'n_words': 149}