remove unnecessary macros

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
Lokesh Mandvekar 2022-10-07 13:48:58 -04:00
parent f54b225c43
commit 849e15503c

View File

@ -23,19 +23,7 @@ BuildArch: noarch
%package -n python%{python3_pkgversion}-%{pypi_name} %package -n python%{python3_pkgversion}-%{pypi_name}
BuildRequires: git-core BuildRequires: git-core
BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-devel
%if ! 0%{?fedora} && 0%{?rhel} <= 8
BuildRequires: python%{python3_pkgversion}-pytoml
BuildRequires: python%{python3_pkgversion}-requests
BuildRequires: python%{python3_pkgversion}-setuptools
Requires: python%{python3_pkgversion}-pytoml
Requires: python%{python3_pkgversion}-requests
%else
BuildRequires: pyproject-rpm-macros BuildRequires: pyproject-rpm-macros
%endif
%if 0%{?centos} <= 8
BuildRequires: python%{python3_pkgversion}-pyxdg
Requires: python%{python3_pkgversion}-pyxdg
%endif
BuildRequires: python%{python3_pkgversion}-requests BuildRequires: python%{python3_pkgversion}-requests
BuildRequires: python%{python3_pkgversion}-toml BuildRequires: python%{python3_pkgversion}-toml
Requires: python%{python3_pkgversion}-requests Requires: python%{python3_pkgversion}-requests
@ -54,39 +42,21 @@ Summary: %{summary}
%prep %prep
%autosetup -Sgit -n %{pypi_name}-%{built_tag_strip} %autosetup -Sgit -n %{pypi_name}-%{built_tag_strip}
%if 0%{?fedora} || 0%{?rhel} >= 9
%generate_buildrequires %generate_buildrequires
%pyproject_buildrequires %{?with_tests:-t} %pyproject_buildrequires %{?with_tests:-t}
%endif
%build %build
export PBR_VERSION="0.0.0" export PBR_VERSION="0.0.0"
%if 0%{?rhel} <= 8
%py3_build
%else
%pyproject_wheel %pyproject_wheel
%endif
%install %install
export PBR_VERSION="0.0.0" export PBR_VERSION="0.0.0"
%if 0%{?rhel} <= 8
%py3_install
%else
%pyproject_install %pyproject_install
%pyproject_save_files %{pypi_name} %pyproject_save_files %{pypi_name}
%endif
%if 0%{?rhel} <= 8
%files -n python3-podman
%license LICENSE
%doc README.md
%{python3_sitelib}/podman/*
%{python3_sitelib}/podman-*/*
%else
%files -n python%{python3_pkgversion}-%{pypi_name} -f %{pyproject_files} %files -n python%{python3_pkgversion}-%{pypi_name} -f %{pyproject_files}
%license LICENSE %license LICENSE
%doc README.md %doc README.md
%endif
%changelog %changelog
%autochangelog %autochangelog