-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
48 lines (42 loc) · 1.57 KB
/
setup.py
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
#!/usr/bin/python3
__version__ = '0.13'
from setuptools import setup, Extension
classifiers = [
'Development Status :: 4 - Beta',
'Operating System :: POSIX :: Linux',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3 :: Only',
'Topic :: System :: Networking :: Monitoring',
]
cmdclass = {}
try:
from Cython.Distutils import build_ext
except ImportError:
USE_CYTHON = False
else:
USE_CYTHON = True
cmdclass.update({'build_ext': build_ext})
ext = '.pyx' if USE_CYTHON else '.c'
extensions = [Extension("fastsnmp.snmp_parser", ["fastsnmp/snmp_parser" + ext])]
if __name__ == "__main__":
if USE_CYTHON:
from Cython.Build import cythonize
extensions = cythonize(extensions, compiler_directives={"cdivision": True})
setup(name='fastsnmp',
ext_modules=extensions,
version=__version__,
author="Aleksandr Balezin",
packages=['fastsnmp'],
package_data={'lib': ['*.pyx', '*.c', 'README.md', 'examples/*.py']},
license='MIT',
url='https://github.com/gescheit/fastsnmp',
author_email='[email protected]',
classifiers=classifiers,
platforms=['Linux'],
long_description=open('README.md', 'r').read(),
long_description_content_type='text/markdown',
keywords="SNMP poller parser library coder decoder",
description="SNMP poller oriented to poll bunch of hosts in short time. "
"Package include poller and SNMP library",
requires=["Cython"],
)