-
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace setup.py in favor of pyproject.toml (#173)
* Replace setup.py by pyproject.toml * adapt tests
- Loading branch information
Showing
5 changed files
with
94 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
[build-system] | ||
requires = ["setuptools>=45", "wheel", "setuptools_scm>=6.2"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "django-revproxy" | ||
authors = [ | ||
{ name = "Sergio Oliveira", email = "sergio@tracy.com.br" }, | ||
] | ||
|
||
description = "Yet another Django reverse proxy application" | ||
readme = "README.rst" | ||
|
||
requires-python = ">=3.7" | ||
keywords = ["django", "reverse proxy", "revproxy"] | ||
license = { text = "MPL v2.0" } | ||
classifiers = [ | ||
"Development Status :: 5 - Production/Stable", | ||
"Environment :: Web Environment", | ||
"Framework :: Django", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", | ||
"Operating System :: OS Independent", | ||
"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", | ||
"Framework :: Django", | ||
"Framework :: Django :: 3.0", | ||
"Framework :: Django :: 3.1", | ||
"Framework :: Django :: 3.2", | ||
"Framework :: Django :: 4.0", | ||
"Framework :: Django :: 4.1", | ||
"Framework :: Django :: 4.2", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Programming Language :: Python :: Implementation :: PyPy", | ||
"Topic :: Internet :: Proxy Servers", | ||
"Topic :: Internet :: WWW/HTTP", | ||
"Topic :: Software Development :: Libraries", | ||
] | ||
dependencies = [ | ||
"Django>=3.0", | ||
"urllib3>=1.12", | ||
] | ||
optional-dependencies.diazo = [ | ||
"diazo>=1.0.5", | ||
"lxml>=3.4", | ||
] | ||
optional-dependencies.tests = [ | ||
"diazo", | ||
"lxml>=3.4", | ||
"coverage", | ||
"flake8", | ||
] | ||
|
||
dynamic = ["version"] | ||
|
||
[tool.setuptools.dynamic] | ||
version = { attr = "revproxy.__version__" } | ||
|
||
[project.urls] | ||
homepage = "https://github.com/jazzband/django-revproxy" | ||
download = "https://pypi.org/project/django-revproxy/" | ||
documentation = "https://django-revproxy.readthedocs.io/en/stable/" | ||
changelog = "https://django-revproxy.readthedocs.io/en/latest/changelog.html" | ||
issues = "https://github.com/jazzband/django-revproxy/issues" | ||
|
||
[tool.setuptools] | ||
packages = ["revproxy"] | ||
|
||
[tool.setuptools_scm] | ||
version_scheme = "post-release" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,3 @@ | ||
import codecs | ||
import os | ||
import re | ||
|
||
from setuptools import setup | ||
|
||
|
||
def read(*parts): | ||
return codecs.open(os.path.join(os.path.dirname(__file__), *parts), | ||
encoding='utf8').read() | ||
|
||
|
||
def find_version(*file_paths): | ||
version_file = read(*file_paths) | ||
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", | ||
version_file, re.M) | ||
if version_match: | ||
return version_match.group(1) | ||
raise RuntimeError("Unable to find version string.") | ||
|
||
|
||
setup( | ||
name='django-revproxy', | ||
description='Yet another Django reverse proxy application.', | ||
version=find_version('revproxy/__init__.py'), | ||
long_description=read('README.rst'), | ||
packages=['revproxy'], | ||
install_requires=[ | ||
'django>=3.0', | ||
'urllib3>=1.12', | ||
], | ||
extras_require={ | ||
'diazo': ['diazo>=1.0.5', 'lxml>=3.4'], | ||
}, | ||
tests_require=['diazo', 'lxml>=3.4'], | ||
test_suite="tests.run.runtests", | ||
author='Sergio Oliveira', | ||
author_email='sergio@tracy.com.br', | ||
url='https://github.com/jazzband/django-revproxy', | ||
license='MPL v2.0', | ||
classifiers=[ | ||
'Development Status :: 5 - Production/Stable', | ||
'Environment :: Web Environment', | ||
'Framework :: Django', | ||
'Intended Audience :: Developers', | ||
'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)', | ||
'Operating System :: OS Independent', | ||
'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', | ||
'Framework :: Django', | ||
'Framework :: Django :: 3.0', | ||
'Framework :: Django :: 3.1', | ||
'Framework :: Django :: 3.2', | ||
'Framework :: Django :: 4.0', | ||
'Framework :: Django :: 4.1', | ||
'Framework :: Django :: 4.2', | ||
'Programming Language :: Python :: Implementation :: CPython', | ||
'Programming Language :: Python :: Implementation :: PyPy', | ||
'Topic :: Internet :: Proxy Servers', | ||
'Topic :: Internet :: WWW/HTTP', | ||
'Topic :: Software Development :: Libraries', | ||
], | ||
) | ||
setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters