-
Notifications
You must be signed in to change notification settings - Fork 46
/
setup.py
136 lines (97 loc) · 4.07 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
import os
from os.path import abspath, dirname, join
from setuptools import setup
"""
New release procedure
- ./utils/update_fingerprints.py
- ./utils/update_tests
- edit pierky/arouteserver/version.py
- dev releases: vX.YY.Z-alpha1, vX.YY.Z-alpha2
- prod release: vX.YY.Z
- edit CHANGES.rst
- verify RST syntax is ok
python setup.py --long-description | rst2html.py --strict --syntax-highlight=none
- build and verify docs
cd docs ; make html ; python3 -m http.server -b 127.0.0.1 8000 ; cd ..
- new files to be added to MANIFEST.in?
- python setup.py sdist
- ~$ ./arouteserver/utils/test_new_rel
dev releases (in 'dev' branch):
- git commit -a -m "v$(python -c 'from pierky.arouteserver.version import __version__; print(__version__)')"
- git tag v$(python -c "from pierky.arouteserver.version import __version__; print(__version__)")
- git push origin dev --tags
prod releases (in 'master' branch):
- git commit -a -m "v$(python -c 'from pierky.arouteserver.version import __version__; print(__version__)')"
- git tag v$(python -c "from pierky.arouteserver.version import __version__; print(__version__)")
- git push origin master --tags
# upload to PyPi done by CD tools in GitHub/Travis
#- ~/.local/bin/twine upload dist/*
#- twine upload --repository testpypi dist/*
#- git push
- edit new release on GitHub
"""
__version__ = None
# Allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
# Get proper long description for package
current_dir = dirname(abspath(__file__))
description = open(join(current_dir, "README.rst")).read()
changes = open(join(current_dir, "CHANGES.rst")).read()
long_description = '\n\n'.join([description, changes])
exec(open(join(current_dir, "pierky/arouteserver/version.py")).read())
install_requires = []
with open("requirements.txt", "r") as f:
for line in f.read().split("\n"):
if line:
install_requires.append(line)
# Get the long description from README.md
setup(
name="arouteserver",
version=__version__,
packages=["pierky", "pierky.arouteserver"],
namespace_packages=["pierky"],
package_data={
"pierky.arouteserver": ["pierky/arouteserver/config.d/*",
"pierky/arouteserver/templates/*",
"pierky/arouteserver/tests/live_tests/skeleton/*.yml",
"pierky/arouteserver/tests/live_tests/skeleton/*.j2"]
},
include_package_data=True,
license="GPLv3",
description="A Python tool to automatically build (and test) configurations for BGP route servers.",
long_description=long_description,
url="https://github.com/pierky/arouteserver",
download_url="https://github.com/pierky/arouteserver",
author="Pier Carlo Chiodi",
author_email="[email protected]",
maintainer="Pier Carlo Chiodi",
maintainer_email="[email protected]",
install_requires=install_requires,
tests_require=[
"pytest",
"mock",
],
test_suite="pytest",
scripts=["scripts/arouteserver"],
keywords=['BGP', 'Route server', 'BIRD', 'IP Routing', 'OpenBGPD', 'IXP', 'IX', 'Internet Exchange'],
classifiers=[
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"Intended Audience :: Telecommunications Industry",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Operating System :: POSIX",
"Operating System :: Unix",
# To be kept in sync with .github/workflows/cicd.yml
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Internet :: WWW/HTTP",
"Topic :: System :: Networking",
],
)