Don’t generate build requires on EL <= 9
Signed-off-by: Nils Philippsen <nils@redhat.com>
This commit is contained in:
parent
b127a043a6
commit
88084de2b8
@ -1,15 +1,11 @@
|
|||||||
%if ! 0%{?rhel} || 0%{?rhel} >= 10
|
%if ! 0%{?rhel} || 0%{?rhel} >= 10
|
||||||
%bcond_without testcoverage
|
%bcond_without testcoverage
|
||||||
%bcond_with setup_py
|
%bcond_without pyproject_build
|
||||||
|
%bcond_without genbrs
|
||||||
%else
|
%else
|
||||||
%bcond_with testcoverage
|
%bcond_with testcoverage
|
||||||
%bcond_without setup_py
|
%bcond_with pyproject_build
|
||||||
%endif
|
%bcond_with genbrs
|
||||||
|
|
||||||
%if ! 0%{?rhel} || 0%{?rhel} >= 9
|
|
||||||
%bcond_with compatbuild
|
|
||||||
%else
|
|
||||||
%bcond_without compatbuild
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{undefined pyproject_files}
|
%if 0%{undefined pyproject_files}
|
||||||
@ -36,15 +32,11 @@ BuildRequires: python3dist(pytest-cov)
|
|||||||
%endif
|
%endif
|
||||||
BuildRequires: sed
|
BuildRequires: sed
|
||||||
|
|
||||||
%if %{without compatbuild}
|
%if %{with genbrs}
|
||||||
%generate_buildrequires
|
%generate_buildrequires
|
||||||
%if %{without setup.py}
|
|
||||||
%{pyproject_buildrequires}
|
%{pyproject_buildrequires}
|
||||||
%else
|
%else
|
||||||
( %{pyproject_buildrequires} ) | grep -v poetry
|
BuildRequires: python3dist(pip)
|
||||||
echo 'python3dist(setuptools)'
|
|
||||||
%endif
|
|
||||||
%else
|
|
||||||
BuildRequires: python3dist(setuptools)
|
BuildRequires: python3dist(setuptools)
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -56,7 +48,7 @@ uses rpmautospec features.}
|
|||||||
|
|
||||||
%package -n python3-%{canonicalname}
|
%package -n python3-%{canonicalname}
|
||||||
Summary: %{summary}
|
Summary: %{summary}
|
||||||
%if %{with compatbuild}
|
%if %{without pyproject_build}
|
||||||
%py_provides python3-%{canonicalname}
|
%py_provides python3-%{canonicalname}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -72,7 +64,7 @@ addopts =
|
|||||||
PYTESTINI
|
PYTESTINI
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with setup_py}
|
%if %{without pyproject_build}
|
||||||
cat << SETUPPY > setup.py
|
cat << SETUPPY > setup.py
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
@ -81,14 +73,14 @@ SETUPPY
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{without compatbuild}
|
%if %{with pyproject_build}
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
%else
|
%else
|
||||||
%py3_build
|
%py3_build
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if %{without compatbuild}
|
%if %{with pyproject_build}
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
%pyproject_save_files %{srcname}
|
%pyproject_save_files %{srcname}
|
||||||
# Work around poetry not listing license files as such in package metadata.
|
# Work around poetry not listing license files as such in package metadata.
|
||||||
@ -103,7 +95,7 @@ echo '%{python3_sitelib}/%{srcname}*' > %{pyproject_files}
|
|||||||
|
|
||||||
%files -n python3-%{canonicalname} -f %{pyproject_files}
|
%files -n python3-%{canonicalname} -f %{pyproject_files}
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%if %{with compatbuild}
|
%if %{without pyproject_build}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user