From 5f220037a86adfd5a90395579808a4c618eaf706 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Sat, 17 Aug 2024 08:26:22 +0200 Subject: [PATCH] migrate to pyproject.toml tooling --- pyproject.toml | 25 ++++++++++++++++++++++--- setup.cfg | 49 ------------------------------------------------- setup.py | 5 ----- tox.ini | 3 ++- 4 files changed, 24 insertions(+), 58 deletions(-) delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml index e286825c..c431d3fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,30 @@ [build-system] requires = [ # sync with setup.py until we discard non-pep-517/518 - "setuptools>=45.0", - "setuptools-scm[toml]>=6.2.3", + "setuptools>=65.0", + "setuptools-scm[toml]>=8.0", ] build-backend = "setuptools.build_meta" +[project] +name = "pluggy" +license = {text = "MIT"} +authors = [{name = "Holger Krekel", email = "holger@merlinux.eu"}] +classifiers = ["Development Status :: 6 - Mature", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: POSIX", "Operating System :: Microsoft :: Windows", "Operating System :: MacOS :: MacOS X", "Topic :: Software Development :: Testing", "Topic :: Software Development :: Libraries", "Topic :: Utilities", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11"] +description = "plugin and hook calling mechanisms for python" +readme = {file = "README.rst", content-type = "text/x-rst"} +requires-python = ">=3.8" + +dynamic = ["version"] +[project.optional-dependencies] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + +[tool.setuptools] +packages = ["pluggy"] +package-dir = {""="src"} +package-data = {"pluggy" = ["py.typed"]} + [tool.ruff.lint] select = [ @@ -21,7 +40,7 @@ known-local-folder = ["pluggy"] lines-after-imports = 2 [tool.setuptools_scm] -write_to = "src/pluggy/_version.py" +version_file = "src/pluggy/_version.py" [tool.towncrier] package = "pluggy" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 1e34d361..00000000 --- a/setup.cfg +++ /dev/null @@ -1,49 +0,0 @@ -[metadata] -name = pluggy -description = plugin and hook calling mechanisms for python -long_description = file: README.rst -long_description_content_type = text/x-rst -license = MIT -platforms = unix, linux, osx, win32 -author = Holger Krekel -author_email = holger@merlinux.eu -url = https://github.com/pytest-dev/pluggy -classifiers = - Development Status :: 6 - Mature - Intended Audience :: Developers - License :: OSI Approved :: MIT License - Operating System :: POSIX - Operating System :: Microsoft :: Windows - Operating System :: MacOS :: MacOS X - Topic :: Software Development :: Testing - Topic :: Software Development :: Libraries - Topic :: Utilities - Programming Language :: Python :: Implementation :: CPython - Programming Language :: Python :: Implementation :: PyPy - Programming Language :: Python :: 3 - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - -[options] -packages = - pluggy -python_requires = >=3.8 -package_dir = - =src -setup_requires = - setuptools-scm -[options.extras_require] -dev = - pre-commit - tox -testing = - pytest - pytest-benchmark -[options.package_data] -pluggy = py.typed - -[devpi:upload] -formats=sdist.tgz,bdist_wheel diff --git a/setup.py b/setup.py deleted file mode 100644 index ed442375..00000000 --- a/setup.py +++ /dev/null @@ -1,5 +0,0 @@ -from setuptools import setup - - -if __name__ == "__main__": - setup(use_scm_version={"write_to": "src/pluggy/_version.py"}) diff --git a/tox.ini b/tox.ini index de464a07..ee728003 100644 --- a/tox.ini +++ b/tox.ini @@ -31,7 +31,7 @@ commands = sphinx-build -W -b html {toxinidir}/docs {toxinidir}/build/html-docs -t changelog_towncrier_draft {posargs:} [pytest] -minversion=2.0 +minversion=8.0 testpaths = testing #--pyargs --doctest-modules --ignore=.tox addopts=-r a @@ -40,6 +40,7 @@ filterwarnings = [flake8] max-line-length=99 +min-python-version = 3.8 [testenv:release] description = do a release, required posarg of the version number