diff --git a/python-pytest-cov.spec b/python-pytest-cov.spec index dfe22f0..0275f81 100644 --- a/python-pytest-cov.spec +++ b/python-pytest-cov.spec @@ -1,26 +1,7 @@ -%global srcname pytest-cov +%global srcname pytest-cov +%global slugname pytest_cov %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_without tests - -Name: python-%{srcname} -Version: 3.0.0 -%forgemeta -Release: %autorelease -Summary: Coverage plugin for pytest - -License: MIT -URL: %{forgeurl} -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 - -BuildRequires: python3-devel -BuildRequires: pyproject-rpm-macros - %global common_description %{expand: This plugin produces coverage reports. Compared to just using coverage run this plugin does some extras: @@ -34,17 +15,37 @@ plugin does some extras: pytest). All features offered by the coverage package should work, either through -pytest-cov’s command line options or through coverage’s config file.} +pytest-cov’s command line options or through coverage’s config file. +} -%description %{common_description} +# During python mass rebuild we need to build python-pytest-cov without +# tests because some dependencies are not yet available +%bcond_without tests + +Name: python-%{srcname} +Version: 3.0.0 +%forgemeta +Release: %autorelease +Summary: Coverage plugin for pytest +License: MIT +URL: %{forgeurl} +Source: %{forgesource} +BuildArch: noarch + +# This fix adjusts the coverage test strings to work with 6.2, +# but they also work with older coverage versions as well. +Patch: pytest-cov-3.0.0-coverage-6.2.patch + +BuildRequires: python3-devel +BuildRequires: pyproject-rpm-macros +%description %{common_description} %package -n python3-%{srcname} Summary: %{summary} %description -n python3-%{srcname} %{common_description} - %prep %forgeautosetup -p1 # The “hunter” testing dependency (https://github.com/ionelmc/python-hunter) is @@ -54,15 +55,12 @@ sed -r -i '/^[[:blank:]]*.hunter.,[[:blank:]]*$/d' setup.py %generate_buildrequires %pyproject_buildrequires -r %{?with_tests:-x testing} - %build %pyproject_wheel - %install %pyproject_install -%pyproject_save_files pytest_cov - +%pyproject_save_files %{slugname} %if %{with tests} %check @@ -79,12 +77,10 @@ EOF %pytest -k "${k}" %endif - %files -n python3-%{srcname} -f %{pyproject_files} %license LICENSE -%doc AUTHORS.rst CHANGELOG.rst CONTRIBUTING.rst README.rst +%doc *.rst %{python3_sitelib}/%{srcname}.pth - %changelog %autochangelog