|
1 | 1 | #!/usr/bin/env python
|
2 |
| -import os |
3 |
| -from pathlib import Path |
4 |
| - |
5 | 2 | from setuptools import setup
|
6 | 3 |
|
7 |
| -import jose # noqa: F401 |
8 |
| - |
9 |
| -long_description = (Path(__file__).parent / "README.rst").read_text() |
10 |
| - |
11 |
| - |
12 |
| -def get_packages(package): |
13 |
| - """ |
14 |
| - Return root package and all sub-packages. |
15 |
| - """ |
16 |
| - return [ |
17 |
| - dirpath |
18 |
| - for dirpath, dirnames, filenames in os.walk(package) |
19 |
| - if os.path.exists(os.path.join(dirpath, "__init__.py")) |
20 |
| - ] |
21 |
| - |
22 |
| - |
23 |
| -pyasn1 = ["pyasn1"] |
24 |
| -extras_require = { |
25 |
| - "cryptography": ["cryptography>=3.4.0"], |
26 |
| - "pycrypto": ["pycrypto >=2.6.0, <2.7.0"] + pyasn1, |
27 |
| - "pycryptodome": ["pycryptodome >=3.3.1, <4.0.0"] + pyasn1, |
28 |
| -} |
29 |
| -# TODO: work this into the extras selection instead. |
30 |
| -install_requires = ["ecdsa != 0.15", "rsa"] + pyasn1 |
31 |
| - |
32 | 4 |
|
33 |
| -setup( |
34 |
| - name="python-jose", |
35 |
| - author="Michael Davis", |
36 |
| - |
37 |
| - description="JOSE implementation in Python", |
38 |
| - license="MIT", |
39 |
| - keywords="jose jws jwe jwt json web token security signing", |
40 |
| - url="http://github.com/mpdavis/python-jose", |
41 |
| - packages=get_packages("jose"), |
42 |
| - long_description=long_description, |
43 |
| - project_urls={ |
44 |
| - "Documentation": "https://python-jose.readthedocs.io/en/latest/", |
45 |
| - "Source": "https://github.com/mpdavis/python-jose/", |
46 |
| - "Tracker": "https://github.com/mpdavis/python-jose/issues/", |
47 |
| - "Changelog": "https://github.com/mpdavis/python-jose/blob/master/CHANGELOG.md", |
48 |
| - }, |
49 |
| - classifiers=[ |
50 |
| - "Development Status :: 5 - Production/Stable", |
51 |
| - "Intended Audience :: Developers", |
52 |
| - "Natural Language :: English", |
53 |
| - "License :: OSI Approved :: MIT License", |
54 |
| - "Programming Language :: Python", |
55 |
| - "Programming Language :: Python :: 3", |
56 |
| - "Programming Language :: Python :: 3 :: Only", |
57 |
| - "Programming Language :: Python :: 3.6", |
58 |
| - "Programming Language :: Python :: 3.7", |
59 |
| - "Programming Language :: Python :: 3.8", |
60 |
| - "Programming Language :: Python :: 3.9", |
61 |
| - "Programming Language :: Python :: 3.10", |
62 |
| - "Programming Language :: Python :: Implementation :: PyPy", |
63 |
| - "Topic :: Utilities", |
64 |
| - ], |
65 |
| - extras_require=extras_require, |
66 |
| - setup_requires=[ |
67 |
| - "pytest-runner", |
68 |
| - "setuptools>=39.2.0", |
69 |
| - ], |
70 |
| - tests_require=[ |
71 |
| - "ecdsa != 0.15", |
72 |
| - "pytest", |
73 |
| - "pytest-cov", |
74 |
| - "pytest-runner", |
75 |
| - ], |
76 |
| - install_requires=install_requires, |
77 |
| -) |
| 5 | +setup() |
0 commit comments