forked from openwisp/netdiff
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
72 lines (63 loc) · 2.29 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
65
66
67
68
69
70
71
72
#!/usr/bin/env python
import sys
from setuptools import setup, find_packages
# avoid networkx ImportError
sys.path.insert(0, 'netdiff')
from info import get_version
sys.path.remove('netdiff')
if sys.argv[-1] == 'setup.py':
print("To install, run 'python setup.py install'\n")
if sys.argv[-1] == 'publish':
import os
os.system("python setup.py sdist bdist_wheel upload -s")
args = {'version': get_version()}
print("You probably want to also tag the version now:")
print(" git tag -a %(version)s -m 'version %(version)s'" % args)
print(" git push --tags")
sys.exit()
def get_install_requires():
"""
parse requirements.txt, ignore links, exclude comments
"""
requirements = []
for line in open('requirements.txt').readlines():
# skip to next iteration if comment or empty line
if line.startswith('#') or line == '' or line.startswith('http') or line.startswith('git'):
continue
# add line to requirements
requirements.append(line.replace('\n', ''))
return requirements
setup(
name='netdiff',
version=get_version(),
description="Python library for parsing network topology data (eg: dynamic "
"routing protocols, NetJSON, CNML) and detect changes.",
long_description=open('README.rst').read(),
author='Federico Capoano (nemesisdesign)',
author_email='ninux-dev@ml.ninux.org',
license='MIT',
url='https://github.com/ninuxorg/netdiff',
download_url='https://github.com/ninuxorg/netdiff/releases',
keywords=['networking',
'mesh-network',
'netjson',
'olsr',
'batman',
'bmx'],
platforms=['Platform Indipendent'],
packages=find_packages(exclude=['tests', 'tests.*', 'docs', 'docs.*']),
zip_safe=False,
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: System :: Networking',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
],
install_requires=get_install_requires(),
test_suite='nose.collector'
)