-
Notifications
You must be signed in to change notification settings - Fork 72
/
setup.py
66 lines (56 loc) · 2.03 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from __future__ import print_function
import codecs
import sys
import platform
import glob
from setuptools import setup, find_packages, Extension
from os.path import abspath, dirname, join
here = abspath(dirname(__file__))
with codecs.open(join(here, 'README.md'), encoding='utf-8') as f:
README = f.read()
libs = ['Ws2_32'] if platform.system() == "Windows" else []
ext = Extension('pyasn.pyasn_radix',
sources=['pyasn/pyasn_radix.c', 'pyasn/_radix/radix.c'],
include_dirs=[join(here, 'pyasn')],
libraries=libs)
extra_kwargs = {'ext_modules': [ext]}
reqs = []
if sys.version_info[0] == 2 and sys.version_info[1] < 7:
reqs.append('ordereddict')
if sys.version_info[0] == 2:
reqs.append('backport-ipaddress')
utils = glob.glob('pyasn-utils/*.py')
__version__ = None
exec(open('pyasn/_version.py').read()) # load the actual __version__
setup(
name='pyasn',
version=__version__,
maintainer='Hadi Asghari',
maintainer_email='hd.asghari@gmail.com',
url='https://github.com/hadiasghari/pyasn',
description='Offline IP address to Autonomous System Number lookup module.',
long_description=README,
license='MIT',
classifiers=[
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: System :: Networking',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
],
keywords='ip asn autonomous system bgp whois prefix radix python routing networking',
install_requires=reqs,
data_files=[],
scripts=utils,
setup_requires=[],
packages=find_packages(exclude=['tests', 'tests.*']),
zip_safe=False,
# 20230901 switch from nose to pytest for running the tests
# tests_require=['nose', 'coverage'],
# test_suite='nose.collector',
extras_require={'test': ['pytest'],},
**extra_kwargs
)