use upstream metadata for test deps

[skip changelog]
This commit is contained in:
Maxwell G 2023-05-06 16:57:06 +00:00
parent 3a8ae5cc66
commit b00a806470
No known key found for this signature in database
GPG Key ID: F79E4E25E8C661F8

View File

@ -20,9 +20,6 @@ Patch0: ruamel-yaml-0.17.22.patch
BuildArch: noarch
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python%{python3_pkgversion}-pytest-xdist
BuildRequires: python%{python3_pkgversion}-jsonschema
BuildRequires: python-unversioned-command
BuildRequires: procps-ng
@ -57,9 +54,20 @@ find -type f -name '*.py' -exec sed \
-e 's/^\( *\)from mock import/\1from unittest.mock import/' \
-i '{}' +
# Fedora does not run coverage tests.
# mock is deprecated in Fedora. We use unittest.mock.
# pip-tools is used directly by the unit tests.
sed \
-e 's|==.*||' \
-e '/coverage/d' \
-e '/mock/d' \
-e '/pip-tools/d' \
-e '/pytest-cov/d' \
requirements-test.txt > _requirements-test.txt
%generate_buildrequires
%pyproject_buildrequires
%pyproject_buildrequires _requirements-test.txt
%build