|
1 | 1 | #!/usr/bin/env python |
2 | 2 | from setuptools import find_packages, setup |
3 | 3 | import os |
| 4 | +import re |
4 | 5 |
|
5 | 6 | PACKAGES = find_packages() |
6 | 7 | REQUIREMENTS = ["django >=3.2,<5.3"] |
|
15 | 16 | "Programming Language :: Python", |
16 | 17 | "Programming Language :: Python :: 3", |
17 | 18 | "Programming Language :: Python :: 3 :: Only", |
18 | | - "Programming Language :: Python :: 3.4", |
19 | | - "Programming Language :: Python :: 3.5", |
20 | | - "Programming Language :: Python :: 3.6", |
21 | | - "Programming Language :: Python :: 3.7", |
22 | 19 | "Programming Language :: Python :: 3.8", |
23 | 20 | "Programming Language :: Python :: 3.9", |
24 | 21 | "Programming Language :: Python :: 3.10", |
|
31 | 28 | ) |
32 | 29 | LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), "README.md")).read() |
33 | 30 |
|
| 31 | +VERSION = "{{VERSION_PLACEHOLDER}}" |
| 32 | +if not re.match(r"^\d+\.\d+\.\d+$", VERSION): |
| 33 | + # In tests, where we haven't replaced the version placeholder, just use a default version |
| 34 | + VERSION = "1.0.0" |
| 35 | + |
34 | 36 | setup( |
35 | 37 | name="django-csp-reports", |
36 | | - version="{{VERSION_PLACEHOLDER}}", |
| 38 | + version=VERSION, |
37 | 39 | description=DESCRIPTION, |
38 | 40 | long_description=LONG_DESCRIPTION, |
39 | 41 | long_description_content_type="text/markdown", |
|
42 | 44 | url="https://github.com/adamalton/django-csp-reports", |
43 | 45 | packages=PACKAGES, |
44 | 46 | include_package_data=True, |
45 | | - python_requires=">=3.4", |
| 47 | + python_requires=">=3.8", |
46 | 48 | install_requires=REQUIREMENTS, |
47 | 49 | tests_require=TEST_REQUIREMENTS, |
48 | 50 | extras_require=EXTRAS_REQUIRE, |
|
0 commit comments