special conditionals only for rhel8
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
parent
686d06f96c
commit
9b3a95f0ea
@ -25,18 +25,14 @@ BuildRequires: python%{python3_pkgversion}-devel
|
||||
%if 0%{?fedora}
|
||||
BuildRequires: pyproject-rpm-macros
|
||||
%else
|
||||
%if %{?rhel} <= 8
|
||||
BuildRequires: python%{python3_pkgversion}-pytoml
|
||||
BuildRequires: python%{python3_pkgversion}-pyxdg
|
||||
BuildRequires: python%{python3_pkgversion}-requests
|
||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||
Requires: python%{python3_pkgversion}-pytoml
|
||||
Requires: python%{python3_pkgversion}-pyxdg
|
||||
Requires: python%{python3_pkgversion}-requests
|
||||
%if %{?rhel} >= 9
|
||||
BuildRequires: python%{python3_pkgversion}-toml
|
||||
Requires: python%{python3_pkgversion}-toml
|
||||
%else
|
||||
BuildRequires: python%{python3_pkgversion}-pytoml
|
||||
Requires: python%{python3_pkgversion}-pytoml
|
||||
%endif
|
||||
%endif
|
||||
Provides: %{pypi_name}-py = %{version}-%{release}
|
||||
Summary: %{summary}
|
||||
@ -48,19 +44,27 @@ Summary: %{summary}
|
||||
%prep
|
||||
%autosetup -Sgit_am -n %{pypi_name}-%{built_tag_strip}
|
||||
|
||||
%if ! 0%{?rhel} <= 8
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires %{?with_tests:-t}
|
||||
%endif
|
||||
|
||||
%build
|
||||
export PBR_VERSION="0.0.0"
|
||||
%if 0%{?rhel} <= 8
|
||||
%py3_build
|
||||
%else
|
||||
%pyproject_wheel
|
||||
%endif
|
||||
|
||||
%install
|
||||
export PBR_VERSION="0.0.0"
|
||||
%if 0{?hrel} <= 8
|
||||
%py3_install
|
||||
%else
|
||||
%pyproject_install
|
||||
%pyproject_save_files %{pypi_name}
|
||||
|
||||
%check
|
||||
%endif
|
||||
|
||||
%files -n python%{python3_pkgversion}-%{pypi_name} -f %{pyproject_files}
|
||||
%license LICENSE
|
||||
|
Loading…
Reference in New Issue
Block a user