remove debbuild macros to comply with Fedora guidelines
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
parent
46fa295bfc
commit
f54b225c43
@ -1,41 +1,29 @@
|
|||||||
%if "%{_vendor}" == "debbuild"
|
|
||||||
%global python3_pkgversion 3
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%global pypi_name podman
|
%global pypi_name podman
|
||||||
%global desc %{pypi_name} is a library of bindings to use the RESTful API for Podman.
|
%global desc %{pypi_name} is a library of bindings to use the RESTful API for Podman.
|
||||||
|
|
||||||
%global pypi_dist 4
|
%global pypi_dist 4
|
||||||
%global built_tag_strip 4.2.0
|
%global built_tag v4.2.0
|
||||||
|
%global built_tag_strip %(b=%{built_tag}; echo ${b:1})
|
||||||
|
%global gen_version %(b=%{built_tag_strip}; echo ${b/-/"~"})
|
||||||
|
|
||||||
Name: python-%{pypi_name}
|
Name: python-%{pypi_name}
|
||||||
Epoch: 3
|
Epoch: 3
|
||||||
Version: 4.2.0
|
Version: %{gen_version}
|
||||||
%if "%{_vendor}" == "debbuild"
|
|
||||||
Packager: Podman Debbuild Maintainers <https://github.com/orgs/containers/teams/podman-debbuild-maintainers>
|
|
||||||
License: ASL-2.0
|
|
||||||
Release: 0%{?dist}
|
|
||||||
%else
|
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
Release: %autorelease
|
Release: %autorelease
|
||||||
%endif
|
|
||||||
Summary: RESTful API for Podman
|
Summary: RESTful API for Podman
|
||||||
URL: https://github.com/containers/%{pypi_name}-py
|
URL: https://github.com/containers/%{pypi_name}-py
|
||||||
Source0: %{url}/releases/download/v%{built_tag_strip}/%{pypi_name}-%{version}.tar.gz
|
# Tarball fetched from upstream
|
||||||
|
Source0: %{url}/releases/download/%{built_tag}/%{pypi_name}-%{version}.tar.gz
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
%desc
|
%desc
|
||||||
|
|
||||||
%package -n python%{python3_pkgversion}-%{pypi_name}
|
%package -n python%{python3_pkgversion}-%{pypi_name}
|
||||||
%if "%{_vendor}" == "debbuild"
|
|
||||||
BuildRequires: git
|
|
||||||
BuildRequires: python%{python3_pkgversion}-dev
|
|
||||||
%else
|
|
||||||
BuildRequires: git-core
|
BuildRequires: git-core
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
%endif
|
%if ! 0%{?fedora} && 0%{?rhel} <= 8
|
||||||
%if ("%{_vendor}" == "debbuild") || (! 0%{?fedora} && 0%{?rhel} <= 8)
|
|
||||||
BuildRequires: python%{python3_pkgversion}-pytoml
|
BuildRequires: python%{python3_pkgversion}-pytoml
|
||||||
BuildRequires: python%{python3_pkgversion}-requests
|
BuildRequires: python%{python3_pkgversion}-requests
|
||||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||||
@ -44,21 +32,14 @@ Requires: python%{python3_pkgversion}-requests
|
|||||||
%else
|
%else
|
||||||
BuildRequires: pyproject-rpm-macros
|
BuildRequires: pyproject-rpm-macros
|
||||||
%endif
|
%endif
|
||||||
%if "%{_vendor}" == "debbuild"
|
|
||||||
BuildRequires: python%{python3_pkgversion}-xdg
|
|
||||||
Requires: python%{python3_pkgversion}-xdg
|
|
||||||
%else
|
|
||||||
%if 0%{?centos} <= 8
|
%if 0%{?centos} <= 8
|
||||||
BuildRequires: python%{python3_pkgversion}-pyxdg
|
BuildRequires: python%{python3_pkgversion}-pyxdg
|
||||||
Requires: python%{python3_pkgversion}-pyxdg
|
Requires: python%{python3_pkgversion}-pyxdg
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?fedora} >= 35
|
|
||||||
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
|
||||||
Requires: python%{python3_pkgversion}-toml
|
Requires: python%{python3_pkgversion}-toml
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
Provides: %{pypi_name}-py = %{version}-%{release}
|
Provides: %{pypi_name}-py = %{version}-%{release}
|
||||||
Provides: python%{python3_pkgversion}dist(%{pypi_name}) = %{pypi_dist}
|
Provides: python%{python3_pkgversion}dist(%{pypi_name}) = %{pypi_dist}
|
||||||
Provides: python%{python3_version}dist(%{pypi_name}) = %{pypi_dist}
|
Provides: python%{python3_version}dist(%{pypi_name}) = %{pypi_dist}
|
||||||
@ -80,28 +61,20 @@ Summary: %{summary}
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
export PBR_VERSION="0.0.0"
|
export PBR_VERSION="0.0.0"
|
||||||
%if "%{_vendor}" == "debbuild"
|
|
||||||
python3 setup.py sdist bdist
|
|
||||||
%else
|
|
||||||
%if 0%{?rhel} <= 8
|
%if 0%{?rhel} <= 8
|
||||||
%py3_build
|
%py3_build
|
||||||
%else
|
%else
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
export PBR_VERSION="0.0.0"
|
export PBR_VERSION="0.0.0"
|
||||||
%if "%{_vendor}" == "debbuild"
|
|
||||||
python3 setup.py install --root %{buildroot}
|
|
||||||
%else
|
|
||||||
%if 0%{?rhel} <= 8
|
%if 0%{?rhel} <= 8
|
||||||
%py3_install
|
%py3_install
|
||||||
%else
|
%else
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
%pyproject_save_files %{pypi_name}
|
%pyproject_save_files %{pypi_name}
|
||||||
%endif
|
%endif
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?rhel} <= 8
|
%if 0%{?rhel} <= 8
|
||||||
%files -n python3-podman
|
%files -n python3-podman
|
||||||
@ -116,6 +89,4 @@ python3 setup.py install --root %{buildroot}
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
%if "%{_vendor}" != "debbuild"
|
|
||||||
%autochangelog
|
%autochangelog
|
||||||
%endif
|
|
||||||
|
Loading…
Reference in New Issue
Block a user