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

Skip to content

Use declarative setup with pyproject.toml #474

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[build-system]
requires = ["setuptools>=65.5.1"]
build-backend = "setuptools.build_meta"

[project]
name = "auth0-python"
dynamic = ["version"]
description = "Auth0 Python SDK"
readme = "README.md"
authors = [
{name = "Auth0", email = "[email protected]"}
]
license = {file = "LICENSE"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"License :: OSI Approved :: MIT License",
"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",
]
requires-python = ">=3.7"
dependencies = [
"requests>=2.14.0",
"pyjwt[crypto]>=2.6.0",
]
[project.optional-dependencies]
test = ["coverage", "pre-commit"]
async = ["aiohttp"]
[project.urls]
homepage = "https://github.com/auth0/auth0-python"
documentation = "https://www.auth0.com/docs"
changelog = "https://github.com/auth0/auth0-python/blob/master/CHANGELOG.md"

[tool.setuptools.dynamic]
version = {attr = "auth0.__version__"}
47 changes: 2 additions & 45 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,46 +1,3 @@
import os
import re
from setuptools import setup

from setuptools import find_packages, setup


def find_version():
file_dir = os.path.dirname(__file__)
with open(os.path.join(file_dir, "auth0", "__init__.py")) as f:
version = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', f.read())
if version:
return version.group(1)
else:
raise RuntimeError("Unable to find version string.")


with open("README.md", encoding="utf-8") as f:
long_description = f.read()


setup(
name="auth0-python",
version=find_version(),
description="Auth0 Python SDK",
long_description=long_description,
long_description_content_type="text/markdown",
author="Auth0",
author_email="[email protected]",
license="MIT",
packages=find_packages(),
install_requires=["requests>=2.14.0", "pyjwt[crypto]>=2.6.0"],
extras_require={"test": ["coverage", "pre-commit"]},
python_requires=">=3.7",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"License :: OSI Approved :: MIT License",
"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",
],
url="https://github.com/auth0/auth0-python",
)
setup()