forked from sebschrader/python-arpreq
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
72 lines (63 loc) · 2.35 KB
/
setup.py
File metadata and controls
72 lines (63 loc) · 2.35 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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')
tests_require.append('ipaddress')
with open('README.rst') as f:
readme = f.read()
setup(name='arpreq',
author='Sebastian Schrader',
author_email='sebastian.schrader@ossmail.de',
url='https://github.com/sebschrader/python-arpreq',
version='0.3.3',
description="Query the Kernel ARP cache for the MAC address "
"corresponding to IP address",
long_description=readme,
package_dir={'': 'src'},
packages=find_packages(exclude=['tests']),
setup_requires=[
'pytest-runner'
],
tests_require=tests_require,
ext_modules=[arpreq],
license='MIT',
platforms=["any"],
classifiers=[
'Development Status :: 5 - Production/Stable',
'License :: OSI Approved :: MIT License',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Operating System :: POSIX :: Linux',
'Programming Language :: C',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: System :: Networking',
],
)