diff --git a/cargo2rpm.spec b/cargo2rpm.spec index 8a7234c..1dcafd8 100644 --- a/cargo2rpm.spec +++ b/cargo2rpm.spec @@ -1,4 +1,7 @@ %bcond_without check +%if %{defined el9} +%global python3_pkgversion 3.11 +%endif Name: cargo2rpm Version: 0.1.2 @@ -11,7 +14,10 @@ Source: %{url}/archive/%{version}/cargo2rpm-%{version}.tar.gz BuildArch: noarch -BuildRequires: python3-devel +BuildRequires: python%{python3_pkgversion}-devel +%if %{with check} +BuildRequires: %{py3_dist pytest} +%endif Requires: cargo @@ -24,7 +30,7 @@ and a Python API (which rust2rpm is built upon). %autosetup -p1 %generate_buildrequires -%pyproject_buildrequires %{?with_check:-t} +%pyproject_buildrequires %build %pyproject_wheel @@ -36,7 +42,7 @@ and a Python API (which rust2rpm is built upon). %check %pyproject_check_import %if %{with check} -%tox +%pytest %endif %files -f %{pyproject_files}