diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..03d07f7 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,40 @@ +[build-system] +requires = ["setuptools",] +build-backend = "setuptools.build_meta" + +[project] +name = "retrying" +version = "1.4.2-dev" +description = "Retrying" +authors = [ + {name = "Greg Roodt"}, +] +license = "Apache-2.0" +readme = "README.rst" +requires-python = ">=3.6" +classifiers = [ + "Intended Audience :: Developers", + "Natural Language :: English", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.6", + "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", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: Implementation :: CPython", + "Topic :: Internet", + "Topic :: Utilities", +] +keywords = ["decorator", "decorators", "retry", "retrying", "exception", "exponential", "backoff"] + +[project.urls] +Homepage = "https://github.com/groodt/retrying" +Repository = "https://github.com/groodt/retrying" + +[tool.setuptools] +py-modules = ["retrying"] diff --git a/setup.py b/setup.py index ea111e9..6c66161 100644 --- a/setup.py +++ b/setup.py @@ -1,45 +1,8 @@ #!/usr/bin/env python -try: - from setuptools import setup -except ImportError: - from distutils.core import setup +""" +Minimal setup.py for legacy compatibility. +All configuration is in pyproject.toml. +""" +from setuptools import setup -CLASSIFIERS = [ - "Intended Audience :: Developers", - "Natural Language :: English", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "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", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Programming Language :: Python :: Implementation :: CPython", - "Topic :: Internet", - "Topic :: Utilities", -] - -with open("README.rst") as file_readme: - readme = file_readme.read() - -with open("HISTORY.rst") as file_history: - history = file_history.read() - -setup( - name="retrying", - version="1.4.2-dev", - description="Retrying", - long_description=readme + "\n\n" + history, - author="Greg Roodt", - license="Apache 2.0", - url="https://github.com/groodt/retrying", - classifiers=CLASSIFIERS, - keywords="decorator decorators retry retrying exception exponential backoff", - py_modules=["retrying"], - test_suite="test_retrying", - python_requires=">=3.6", -) +setup()