|
1 | 1 | import os |
| 2 | +from os.path import abspath, dirname, join |
2 | 3 | from setuptools import setup |
3 | 4 |
|
4 | 5 | __version__ = None |
|
8 | 9 | install_requires = [ |
9 | 10 | "python-dateutil", |
10 | 11 | "pytz", |
| 12 | + "cryptography", |
11 | 13 | ] |
12 | 14 |
|
13 | | -tests_require = ["nose"] |
14 | | - |
15 | | -if "SAGAN_WITHOUT_SSL" not in os.environ: |
16 | | - install_requires.append("cryptography") |
17 | | - |
18 | 15 | # Allow setup.py to be run from any path |
19 | 16 | os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) |
20 | 17 |
|
21 | | -readme_path = os.path.join(os.path.dirname(__file__), "README.rst") |
22 | | -changelog_path = os.path.join(os.path.dirname(__file__), "CHANGES.rst") |
| 18 | +# Get proper long description for package |
| 19 | +current_dir = dirname(abspath(__file__)) |
| 20 | +description = open(join(current_dir, "README.rst")).read() |
| 21 | +changes = open(join(current_dir, "CHANGES.rst")).read() |
| 22 | +long_description = "\n\n".join([description, changes]) |
23 | 23 |
|
24 | | -# Get the long description from README.md |
25 | | -with open(readme_path) as readme: |
26 | | - with open(changelog_path) as changelog: |
27 | | - setup( |
28 | | - name="ripe.atlas.sagan", |
29 | | - version=__version__, |
30 | | - packages=["ripe", "ripe.atlas", "ripe.atlas.sagan"], |
31 | | - namespace_packages=["ripe", "ripe.atlas"], |
32 | | - include_package_data=True, |
33 | | - license="GPLv3", |
34 | | - description="A parser for RIPE Atlas measurement results", |
35 | | - long_description="{readme}\n\n{changelog}".format( |
36 | | - readme=readme.read(), |
37 | | - changelog=changelog.read() |
38 | | - ), |
39 | | - url="https://github.com/RIPE-NCC/ripe.atlas.sagan", |
40 | | - download_url="https://github.com/RIPE-NCC/ripe.atlas.sagan", |
41 | | - author="The RIPE Atlas Team", |
42 | | - author_email="atlas@ripe.net", |
43 | | - maintainer="The RIPE Atlas Team", |
44 | | - maintainer_email="atlas@ripe.net", |
45 | | - install_requires=install_requires, |
46 | | - tests_require=tests_require, |
47 | | - extras_require={ |
48 | | - "fast": ["ujson"], |
49 | | - "doc": ["sphinx"] |
50 | | - }, |
51 | | - test_suite="nose.collector", |
52 | | - classifiers=[ |
53 | | - "Operating System :: POSIX", |
54 | | - "Operating System :: Unix", |
55 | | - "Programming Language :: Python", |
56 | | - "Programming Language :: Python :: 2.7", |
57 | | - "Programming Language :: Python :: 3.5", |
58 | | - "Programming Language :: Python :: 3.6", |
59 | | - "Programming Language :: Python :: 3.7", |
60 | | - "Topic :: Internet :: WWW/HTTP", |
61 | | - ], |
62 | | - ) |
| 24 | +setup( |
| 25 | + name="ripe.atlas.sagan", |
| 26 | + version=__version__, |
| 27 | + packages=["ripe", "ripe.atlas", "ripe.atlas.sagan"], |
| 28 | + namespace_packages=["ripe", "ripe.atlas"], |
| 29 | + include_package_data=True, |
| 30 | + license="GPLv3", |
| 31 | + description="A parser for RIPE Atlas measurement results", |
| 32 | + long_description=long_description, |
| 33 | + url="https://github.com/RIPE-NCC/ripe.atlas.sagan", |
| 34 | + download_url="https://github.com/RIPE-NCC/ripe.atlas.sagan", |
| 35 | + author="The RIPE Atlas Team", |
| 36 | + author_email="atlas@ripe.net", |
| 37 | + maintainer="The RIPE Atlas Team", |
| 38 | + maintainer_email="atlas@ripe.net", |
| 39 | + install_requires=install_requires, |
| 40 | + extras_require={ |
| 41 | + "fast": ["ujson"], |
| 42 | + "doc": ["sphinx"] |
| 43 | + }, |
| 44 | + classifiers=[ |
| 45 | + "Operating System :: POSIX", |
| 46 | + "Operating System :: Unix", |
| 47 | + "Programming Language :: Python", |
| 48 | + "Programming Language :: Python :: 3.10", |
| 49 | + "Programming Language :: Python :: 3.11", |
| 50 | + "Programming Language :: Python :: 3.12", |
| 51 | + "Programming Language :: Python :: 3.13", |
| 52 | + "Topic :: Internet :: WWW/HTTP", |
| 53 | + ], |
| 54 | +) |
0 commit comments