Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fd06a18

Browse files
authored
Use declarative setup with pyproject.toml (#474)
2 parents ba24588 + 6ea44f2 commit fd06a18

File tree

2 files changed

+41
-45
lines changed

2 files changed

+41
-45
lines changed

pyproject.toml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[build-system]
2+
requires = ["setuptools>=65.5.1"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "auth0-python"
7+
dynamic = ["version"]
8+
description = "Auth0 Python SDK"
9+
readme = "README.md"
10+
authors = [
11+
{name = "Auth0", email = "[email protected]"}
12+
]
13+
license = {file = "LICENSE"}
14+
classifiers = [
15+
"Development Status :: 5 - Production/Stable",
16+
"Intended Audience :: Developers",
17+
"Operating System :: OS Independent",
18+
"License :: OSI Approved :: MIT License",
19+
"Programming Language :: Python :: 3.7",
20+
"Programming Language :: Python :: 3.8",
21+
"Programming Language :: Python :: 3.9",
22+
"Programming Language :: Python :: 3.10",
23+
"Programming Language :: Python :: 3.11",
24+
]
25+
requires-python = ">=3.7"
26+
dependencies = [
27+
"requests>=2.14.0",
28+
"pyjwt[crypto]>=2.6.0",
29+
]
30+
[project.optional-dependencies]
31+
test = ["coverage", "pre-commit"]
32+
async = ["aiohttp"]
33+
[project.urls]
34+
homepage = "https://github.com/auth0/auth0-python"
35+
documentation = "https://www.auth0.com/docs"
36+
changelog = "https://github.com/auth0/auth0-python/blob/master/CHANGELOG.md"
37+
38+
[tool.setuptools.dynamic]
39+
version = {attr = "auth0.__version__"}

setup.py

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,3 @@
1-
import os
2-
import re
1+
from setuptools import setup
32

4-
from setuptools import find_packages, setup
5-
6-
7-
def find_version():
8-
file_dir = os.path.dirname(__file__)
9-
with open(os.path.join(file_dir, "auth0", "__init__.py")) as f:
10-
version = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', f.read())
11-
if version:
12-
return version.group(1)
13-
else:
14-
raise RuntimeError("Unable to find version string.")
15-
16-
17-
with open("README.md", encoding="utf-8") as f:
18-
long_description = f.read()
19-
20-
21-
setup(
22-
name="auth0-python",
23-
version=find_version(),
24-
description="Auth0 Python SDK",
25-
long_description=long_description,
26-
long_description_content_type="text/markdown",
27-
author="Auth0",
28-
author_email="[email protected]",
29-
license="MIT",
30-
packages=find_packages(),
31-
install_requires=["requests>=2.14.0", "pyjwt[crypto]>=2.6.0"],
32-
extras_require={"test": ["coverage", "pre-commit"]},
33-
python_requires=">=3.7",
34-
classifiers=[
35-
"Development Status :: 5 - Production/Stable",
36-
"Intended Audience :: Developers",
37-
"Operating System :: OS Independent",
38-
"License :: OSI Approved :: MIT License",
39-
"Programming Language :: Python :: 3.7",
40-
"Programming Language :: Python :: 3.8",
41-
"Programming Language :: Python :: 3.9",
42-
"Programming Language :: Python :: 3.10",
43-
"Programming Language :: Python :: 3.11",
44-
],
45-
url="https://github.com/auth0/auth0-python",
46-
)
3+
setup()

0 commit comments

Comments
 (0)