|
|
@ -1,6 +1,9 @@
|
|
|
|
%global srcname pytest-cov
|
|
|
|
%global srcname pytest-cov
|
|
|
|
%global forgeurl https://github.com/pytest-dev/%{srcname}
|
|
|
|
%global forgeurl https://github.com/pytest-dev/%{srcname}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# During python mass rebuild we need to build python-pytest-cov without tests because some dependencies are not yet available
|
|
|
|
|
|
|
|
%bcond_with tests
|
|
|
|
|
|
|
|
|
|
|
|
Name: python-%{srcname}
|
|
|
|
Name: python-%{srcname}
|
|
|
|
Version: 3.0.0
|
|
|
|
Version: 3.0.0
|
|
|
|
%forgemeta
|
|
|
|
%forgemeta
|
|
|
@ -10,6 +13,8 @@ Summary: Coverage plugin for pytest
|
|
|
|
License: MIT
|
|
|
|
License: MIT
|
|
|
|
URL: %{forgeurl}
|
|
|
|
URL: %{forgeurl}
|
|
|
|
Source0: %{forgesource}
|
|
|
|
Source0: %{forgesource}
|
|
|
|
|
|
|
|
# This fix adjusts the coverage test strings to work with 6.2, but they also work with older coverage versions as well.
|
|
|
|
|
|
|
|
Patch0: pytest-cov-3.0.0-coverage-6.2.patch
|
|
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
|
@ -41,18 +46,13 @@ Summary: %{summary}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%prep
|
|
|
|
%forgeautosetup
|
|
|
|
%forgeautosetup -p1
|
|
|
|
# The “hunter” testing dependency (https://github.com/ionelmc/python-hunter) is
|
|
|
|
# The “hunter” testing dependency (https://github.com/ionelmc/python-hunter) is
|
|
|
|
# not packaged, but it also does not seem to be used.
|
|
|
|
# not packaged, but it also does not seem to be used.
|
|
|
|
sed -r -i '/^[[:blank:]]*.hunter.,[[:blank:]]*$/d' setup.py
|
|
|
|
sed -r -i '/^[[:blank:]]*.hunter.,[[:blank:]]*$/d' setup.py
|
|
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
|
%generate_buildrequires
|
|
|
|
|
|
|
|
%pyproject_buildrequires -r %{?with_tests:-x testing}
|
|
|
|
%if 0%{?rhel} >= 9
|
|
|
|
|
|
|
|
%pyproject_buildrequires
|
|
|
|
|
|
|
|
%else
|
|
|
|
|
|
|
|
%pyproject_buildrequires -x testing
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
@ -64,9 +64,8 @@ sed -r -i '/^[[:blank:]]*.hunter.,[[:blank:]]*$/d' setup.py
|
|
|
|
%pyproject_save_files pytest_cov
|
|
|
|
%pyproject_save_files pytest_cov
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?rhel} >= 9
|
|
|
|
|
|
|
|
echo "disabling tests in epel until all the dependencies are satisfied"
|
|
|
|
%if %{with tests}
|
|
|
|
%else
|
|
|
|
|
|
|
|
%check
|
|
|
|
%check
|
|
|
|
k="$(awk 'NR>1 {pre=" and " } { printf "%snot %s", pre, $0 }' <<EOF
|
|
|
|
k="$(awk 'NR>1 {pre=" and " } { printf "%snot %s", pre, $0 }' <<EOF
|
|
|
|
test_append_coverage_subprocess
|
|
|
|
test_append_coverage_subprocess
|
|
|
@ -81,6 +80,7 @@ EOF
|
|
|
|
%pytest -k "${k}"
|
|
|
|
%pytest -k "${k}"
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python3-%{srcname} -f %{pyproject_files}
|
|
|
|
%files -n python3-%{srcname} -f %{pyproject_files}
|
|
|
|
%license LICENSE
|
|
|
|
%license LICENSE
|
|
|
|
%doc AUTHORS.rst CHANGELOG.rst CONTRIBUTING.rst README.rst
|
|
|
|
%doc AUTHORS.rst CHANGELOG.rst CONTRIBUTING.rst README.rst
|
|
|
|