<commit_before>import platform

from setuptools import Extension, find_packages, setup

arpreq = Extension('arpreq', sources=['src/arpreq.c'],
                   extra_compile_args=['-std=c99'])

python_major_version = platform.python_version_tuple()[0]


tests_require = [
        'pytest',
        'netaddr'
]
if python_major_version == '2':
    tests_require.append('ipaddr')


setup(name='arpreq',
      author='<NAME>',
      author_email='<EMAIL>',
      url='https://github.com/sebschrader/python-arpreq',
      version='0.1.0',
      description="Query the Kernel ARP cache for the MAC address "
                  "corresponding to IP address",
      packages=find_packages(exclude=["*.tests"]),
      setup_requires=[<commit_msg>Build with _POSIX_SOURCE and _DEFAULT_SOURCE<commit_after>import platform

from setuptools import Extension, find_packages, setup


# PyPy does include glibc standard headers, but does not define any of the
# feature_test_macros(7)
# CPython on the other hand complains, if you define any of these macros
if platform.python_implementation() == 'PyPy':
    define_macros = [
            ('_XOPEN_SOURCE', '700'),
            ('_DEFAULT_SOURCE', '1'),
            ('_BSD_SOURCE', '1'),
    ]
else:
    define_macros = None

arpreq = Extension('arpreq', sources=['src/arpreq.c'],
                   extra_compile_args=['-std=c99'],
                   define_macros=define_macros)

python_major_version = platform.python_version_tuple()[0]


tests_require = [
        'pytest',
        'netaddr'
]
if python_major_version == '2':
    tests_require.append('ipaddr')


setup(name='arpreq',
      author='<NAME>',
      author_email='<EMAIL>',
      url='https://github.com/sebschrader/python-arpreq',
      version='0.1.0',
      description="Query the Kernel ARP cache for the MAC address "
                  "corresponding to IP address",
      packages=find_packages(exclude=["*.tests"]),
      setup_requires=[
{'fraction_non_alphanumeric': 0.12949640287769784, 'fraction_numerical': 0.010277492291880781, 'mean_word_length': 3.2510917030567685, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2025174', 'n_tokens_mistral': 623, 'n_tokens_neox': 601, 'n_words': 126}