From b0269b52623fe80394871d2584eef4e29046fb27 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 28 Feb 2025 08:25:03 -0500 Subject: [PATCH 1/2] Remove pytest-runner from setup_requires The `pytest-runner` package has been deprecated upstream for some time, and the project is now archived: https://github.com/pytest-dev/pytest-runner/tree/v6.0.1?tab=readme-ov-file#deprecation-notice Furthermore, the "setup.py test" command was removed in setuptools 72: https://github.com/pypa/setuptools/blob/v75.8.0/NEWS.rst#v7200 This does not affect running the tests with pytest or tox. Fixes #57. --- setup.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/setup.py b/setup.py index c99d33d..ec7791f 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,6 @@ import sys import setuptools from distutils.sysconfig import get_config_vars -from pkg_resources import parse_version from setuptools import Distribution as _Distribution, setup from setuptools.command.build_ext import build_ext as _build_ext import errno @@ -144,14 +143,6 @@ def get_objects(): with open(os.path.join(base_dir, "README.rst")) as f: long_description = f.read() -# On some systems(e.g. Debian 8, CentOS 7) the setuptools package is very old. -# We try to install an old version of pytest-runner without setuptools_scm dependency. -# See: https://github.com/pytest-dev/pytest-runner/blob/master/CHANGES.rst -if parse_version(setuptools.__version__) < parse_version("12"): - setup_requires = ["pytest-runner<2.4"] -else: - setup_requires = ["pytest-runner"] - setup( name=about["__title__"], @@ -185,7 +176,7 @@ def get_objects(): ], setup_requires=[ "cffi>=1.0.0", - ] + setup_requires, + ], tests_require=[ "pytest", ], From ef0737151173109bbbfac88cf2d1e5c62c822168 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 28 Feb 2025 08:33:34 -0500 Subject: [PATCH 2/2] Replace tests_require with a "test" extra --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index ec7791f..1d55ecf 100755 --- a/setup.py +++ b/setup.py @@ -177,10 +177,10 @@ def get_objects(): setup_requires=[ "cffi>=1.0.0", ], - tests_require=[ - "pytest", - ], extras_require={ + "test": [ + "pytest", + ], "docstest": [ "doc8", "readme_renderer >= 16.0",