Move test dependencies removal from fix-tests.patch to a sed

That way, the patch is easier applied for future rebases.

pyproject.toml after %prep is identical to what it was before this commit.

[skip changelog]
This commit is contained in:
Miro Hrončok 2025-11-10 11:19:50 +01:00
commit bfcb4db415
2 changed files with 6 additions and 25 deletions

View file

@ -28,9 +28,8 @@ License: MIT
URL: https://tox.readthedocs.io/
Source: %{pypi_source tox}
# Remove dependency on devpi-process.
# Remove dependency on detect-test-pollution.
# Remove coverage-related dependencies.
# Remove usage of devpi-process.
# Remove coverage options.
# Adjust virtualenv environment variables to make it work with our patched virtualenv.
# Adjust setuptools-version specific ifs to check for setuptools version rather than Python version.
# Ignore ResourceWarning: subprocess ... is still running (happens arbitrarily, possibly due to pytest-xdist usage)
@ -103,12 +102,14 @@ Recommends: python3-devel
# Upstream updates dependencies too aggressively
# see https://github.com/tox-dev/tox/pull/2843#discussion_r1065028356
# First, carefully adjust the pins of build and runtime dependencies,
# then remove all the >= specifiers from tests deps, whatever they are.
# then remove all the >= specifiers from tests deps, whatever they are,
# finally, remove undesired test dependencies.
sed -ri -e 's/"(packaging|filelock|platformdirs|pyproject-api|cachetools|hatch-vcs)>=.*/"\1",/g' \
-e 's/"(virtualenv)>=.*/"\1>=20.29",/g' \
-e 's/"(hatchling)>=.*/"\1>=1.13",/g' \
-e 's/"(pluggy)>=.*/"\1>=1.5",/g' \
-e '/^test = \[/,/^\]/ { s/>=[^;"]+// }' \
-e '/^test = \[/,/^\]/ { /"(covdefaults|coverage|detect-test-pollution|devpi-process|diff-cover|pytest-cov)[;"]/d }' \
pyproject.toml
%generate_buildrequires