diff --git a/python-sure.spec b/python-sure.spec index 7500b33..906c68f 100644 --- a/python-sure.spec +++ b/python-sure.spec @@ -21,11 +21,16 @@ Patch2: python3.10-workaround.patch BuildArch: noarch BuildRequires: python3-devel -BuildRequires: python3-mock -BuildRequires: python3-nose -BuildRequires: python3-pytest -BuildRequires: python3-setuptools -BuildRequires: python3-six +BuildRequires: pyproject-rpm-macros + +# TODO: remove mock dependency from install_requires +# https://fedoraproject.org/wiki/Changes/DeprecatePythonMock +# https://github.com/gabrielfalcao/sure/pull/161 + +# TODO: remove the test dependency on nose +# https://fedoraproject.org/wiki/Changes/DeprecateNose +BuildRequires: python3dist(nose) +BuildRequires: python3dist(pytest) %global common_description %{expand: An idiomatic testing library for python with powerful and flexible assertions @@ -35,6 +40,10 @@ after RSpec Expectations and should.js.} %description %{common_description} +%generate_buildrequires +%pyproject_buildrequires -r + + %package -n python3-%{srcname} Summary: %{summary} @@ -46,24 +55,23 @@ Summary: %{summary} %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files %{srcname} %check %pytest -%files -n python3-%{srcname} +%files -n python3-%{srcname} -f %{pyproject_files} %license COPYING %doc CHANGELOG.md %doc README.rst %doc TODO.rst -%{python3_sitelib}/%{srcname}/ -%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info/ %changelog @@ -77,6 +85,7 @@ Summary: %{summary} - Properly mark the license file - Package CHANGELOG.md, README.rst, and TODO.rst - Update summaries and descriptions +- Switch to pyproject-rpm-macros * Wed Jun 02 2021 Python Maint - 1.4.11-13 - Rebuilt for Python 3.10