From 63657dec2b229fa1f6200ce98dd2a2e48a122dcd Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 11 Feb 2024 19:14:26 -0800 Subject: [PATCH 1/5] pyproject.toml: Move metadata and setuptools config here from setup.cfg --- pyproject.toml | 71 ++++++++++++++++++++++++++++++++++++++++++++++++-- setup.cfg | 63 -------------------------------------------- 2 files changed, 69 insertions(+), 65 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 19ee000c..8b770743 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,11 +1,78 @@ [build-system] requires = [ - "setuptools>=45.0", + "setuptools>=61.2", "setuptools-scm[toml]>=6.2.3", - "wheel", ] build-backend = "setuptools.build_meta" +[project] +name = "pytest-xdist" +description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs" +license = {text = "MIT"} +authors = [{name = "holger krekel and contributors", email = "pytest-dev@python.org"}, {email = "holger@merlinux.eu"}] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Framework :: Pytest", + "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 :: Quality Assurance", + "Topic :: Utilities", + "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", +] +requires-python = ">=3.7" +dependencies = [ + "execnet>=1.1", + "pytest>=6.2.0", +] +dynamic = ["version"] + +[project.readme] +file = "README.rst" +content-type = "text/x-rst" + +[project.urls] +Homepage = "https://github.com/pytest-dev/pytest-xdist" +Documentation = "https://pytest-xdist.readthedocs.io/en/latest" +Changelog = "https://pytest-xdist.readthedocs.io/en/latest/changelog.html" +Source = "https://github.com/pytest-dev/pytest-xdist" +Tracker = "https://github.com/pytest-dev/pytest-xdist/issues" + +[project.entry-points.pytest11] +xdist = "xdist.plugin" +"xdist.looponfail" = "xdist.looponfail" + +[project.optional-dependencies] +testing = ["filelock"] +psutil = ["psutil>=3.0"] +setproctitle = ["setproctitle"] + +[tool.setuptools] +package-dir = {"" = "src"} +zip-safe = false +platforms = [ + "linux", + "osx", + "win32", +] +license-files = ["LICENSE"] +include-package-data = false + +[tool.setuptools.packages.find] +where = ["src"] +namespaces = false + [tool.setuptools_scm] write_to = "src/xdist/_version.py" diff --git a/setup.cfg b/setup.cfg index 8e420ae8..37a4a3a5 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,66 +1,3 @@ -[metadata] -name = pytest-xdist -description = pytest xdist plugin for distributed testing, most importantly across multiple CPUs -long_description = file: README.rst -long_description_content_type = text/x-rst -license = MIT -author = holger krekel and contributors -author_email = pytest-dev@python.org,holger@merlinux.eu -url = https://github.com/pytest-dev/pytest-xdist -platforms = - linux - osx - win32 -classifiers = - Development Status :: 5 - Production/Stable - Framework :: Pytest - 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 :: Quality Assurance - Topic :: Utilities - 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 -license_file = LICENSE -project_urls = - Documentation=https://pytest-xdist.readthedocs.io/en/latest - Changelog=https://pytest-xdist.readthedocs.io/en/latest/changelog.html - Source=https://github.com/pytest-dev/pytest-xdist - Tracker=https://github.com/pytest-dev/pytest-xdist/issues - -[options] -packages = find: -package_dir = =src -zip_safe = False -python_requires = >=3.7 -install_requires = - execnet>=1.1 - pytest>=6.2.0 - -[options.packages.find] -where = src - -[options.entry_points] -pytest11 = - xdist = xdist.plugin - xdist.looponfail = xdist.looponfail - -[options.extras_require] -testing = - filelock -psutil = psutil>=3.0 -setproctitle = setproctitle - [flake8] # Ignore any errors related to formatting, let black worry/fix them. ignore = E501, W503, E203 From aee188a60c2fd07601f2c1fe44c4a2065ad735ca Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 11 Feb 2024 22:27:19 -0800 Subject: [PATCH 2/5] changelog/1020.trivial: New --- changelog/1020.trivial | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/1020.trivial diff --git a/changelog/1020.trivial b/changelog/1020.trivial new file mode 100644 index 00000000..40a1f04d --- /dev/null +++ b/changelog/1020.trivial @@ -0,0 +1 @@ +Move metadata and setuptools configuration to pyproject.toml file. From da3ad5acc4804473cae7c9fd42bbfef7fb7626a9 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 12 Feb 2024 11:40:01 -0300 Subject: [PATCH 3/5] Also move flake8 and mypy configuration to pyproject.toml --- pyproject.toml | 22 ++++++++++++++++++++++ setup.cfg | 20 -------------------- 2 files changed, 22 insertions(+), 20 deletions(-) delete mode 100644 setup.cfg diff --git a/pyproject.toml b/pyproject.toml index 8b770743..3c09e366 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,6 +76,28 @@ namespaces = false [tool.setuptools_scm] write_to = "src/xdist/_version.py" +[tool.flake8] +# Ignore any errors related to formatting, let black worry/fix them. +ignore = ["E501", "W503", "E203"] +max-line-length = 100 + +[tool.mypy] +mypy_path = ["src"] +# TODO: Enable this & fix errors. +# check_untyped_defs = true +disallow_any_generics = true +ignore_missing_imports = true +no_implicit_optional = true +show_error_codes = true +strict_equality = true +warn_redundant_casts = true +warn_return_any = true +warn_unreachable = true +warn_unused_configs = true +# TODO: Enable this & fix errors. +# no_implicit_reexport = true + + [tool.towncrier] package = "xdist" filename = "CHANGELOG.rst" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 37a4a3a5..00000000 --- a/setup.cfg +++ /dev/null @@ -1,20 +0,0 @@ -[flake8] -# Ignore any errors related to formatting, let black worry/fix them. -ignore = E501, W503, E203 -max-line-length = 100 - -[mypy] -mypy_path = src -# TODO: Enable this & fix errors. -# check_untyped_defs = True -disallow_any_generics = True -ignore_missing_imports = True -no_implicit_optional = True -show_error_codes = True -strict_equality = True -warn_redundant_casts = True -warn_return_any = True -warn_unreachable = True -warn_unused_configs = True -# TODO: Enable this & fix errors. -# no_implicit_reexport = True From 16f6f15f0880172175a7d2af3bc279c5f6836840 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 12 Feb 2024 11:41:36 -0300 Subject: [PATCH 4/5] Use similar changelog entry as pytest's --- changelog/1020.trivial | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/changelog/1020.trivial b/changelog/1020.trivial index 40a1f04d..336a69fe 100644 --- a/changelog/1020.trivial +++ b/changelog/1020.trivial @@ -1 +1,4 @@ -Move metadata and setuptools configuration to pyproject.toml file. +pytest-xdist's ``setup.py`` file is removed. + +If you relied on this file, e.g. to install pytest using ``setup.py install``, +please see `Why you shouldn't invoke setup.py directly `_ for alternatives. From 496d5efd84e28f8c8540dd0ea312daf52942db5b Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Mon, 12 Feb 2024 11:50:31 -0300 Subject: [PATCH 5/5] Simplify pyprojet.toml --- pyproject.toml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3c09e366..bb6cc5e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,8 @@ build-backend = "setuptools.build_meta" [project] name = "pytest-xdist" description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs" -license = {text = "MIT"} +readme = "README.rst" +license = {file="LICENSE"} authors = [{name = "holger krekel and contributors", email = "pytest-dev@python.org"}, {email = "holger@merlinux.eu"}] classifiers = [ "Development Status :: 5 - Production/Stable", @@ -38,10 +39,6 @@ dependencies = [ ] dynamic = ["version"] -[project.readme] -file = "README.rst" -content-type = "text/x-rst" - [project.urls] Homepage = "https://github.com/pytest-dev/pytest-xdist" Documentation = "https://pytest-xdist.readthedocs.io/en/latest" @@ -59,20 +56,14 @@ psutil = ["psutil>=3.0"] setproctitle = ["setproctitle"] [tool.setuptools] -package-dir = {"" = "src"} zip-safe = false platforms = [ "linux", "osx", "win32", ] -license-files = ["LICENSE"] include-package-data = false -[tool.setuptools.packages.find] -where = ["src"] -namespaces = false - [tool.setuptools_scm] write_to = "src/xdist/_version.py"