2021-06-09 16:04:46 +00:00
|
|
|
%global pypi_name podman
|
|
|
|
%global desc %{pypi_name} is a library of bindings to use the RESTful API for Podman.
|
|
|
|
|
2022-03-09 17:03:46 +00:00
|
|
|
%global built_tag v4.0.0
|
2021-08-12 12:46:22 +00:00
|
|
|
%global built_tag_strip %(b=%{built_tag}; echo ${b:1})
|
2022-01-27 19:09:29 +00:00
|
|
|
%global gen_version %(b=%{built_tag_strip}; echo ${b/-/"~"})
|
2021-08-12 12:46:22 +00:00
|
|
|
|
2021-06-09 16:04:46 +00:00
|
|
|
Name: python-%{pypi_name}
|
|
|
|
Epoch: 3
|
2022-01-27 19:09:29 +00:00
|
|
|
Version: %{gen_version}
|
|
|
|
Release: %autorelease
|
2021-06-09 16:04:46 +00:00
|
|
|
Summary: RESTful API for Podman
|
|
|
|
License: ASL 2.0
|
|
|
|
URL: https://github.com/containers/%{pypi_name}-py
|
2021-08-16 14:32:06 +00:00
|
|
|
Source0: %{url}/releases/download/%{built_tag}/%{pypi_name}-%{version}.tar.gz
|
2021-06-09 16:04:46 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description
|
|
|
|
%desc
|
|
|
|
|
|
|
|
%package -n python%{python3_pkgversion}-%{pypi_name}
|
|
|
|
BuildRequires: git-core
|
2022-03-09 18:36:36 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
2022-03-09 19:14:51 +00:00
|
|
|
# Handle rhel/centos 8 stream conditionals for podman4 copr
|
2022-03-09 19:31:20 +00:00
|
|
|
%if 0%{?rhel} <= 8
|
2022-03-09 18:57:57 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-pytoml
|
2022-03-09 18:36:36 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-pyxdg
|
|
|
|
BuildRequires: python%{python3_pkgversion}-requests
|
|
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
2022-03-09 18:57:57 +00:00
|
|
|
Requires: python%{python3_pkgversion}-pytoml
|
2022-03-09 18:36:36 +00:00
|
|
|
Requires: python%{python3_pkgversion}-pyxdg
|
|
|
|
Requires: python%{python3_pkgversion}-requests
|
2022-03-09 19:14:51 +00:00
|
|
|
%else
|
|
|
|
BuildRequires: pyproject-rpm-macros
|
2022-03-09 18:36:36 +00:00
|
|
|
%endif
|
2021-06-09 16:04:46 +00:00
|
|
|
Provides: %{pypi_name}-py = %{version}-%{release}
|
|
|
|
Summary: %{summary}
|
|
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
|
|
|
|
|
|
|
|
%description -n python%{python3_pkgversion}-%{pypi_name}
|
|
|
|
%desc
|
|
|
|
|
|
|
|
%prep
|
2021-08-16 19:14:06 +00:00
|
|
|
%autosetup -Sgit_am -n %{pypi_name}-%{built_tag_strip}
|
2021-06-09 16:04:46 +00:00
|
|
|
|
2022-03-09 18:57:57 +00:00
|
|
|
%if ! 0%{?rhel} <= 8
|
2021-06-09 16:04:46 +00:00
|
|
|
%generate_buildrequires
|
|
|
|
%pyproject_buildrequires %{?with_tests:-t}
|
2022-03-09 18:57:57 +00:00
|
|
|
%endif
|
2021-06-09 16:04:46 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
export PBR_VERSION="0.0.0"
|
2022-03-09 18:57:57 +00:00
|
|
|
%if 0%{?rhel} <= 8
|
|
|
|
%py3_build
|
|
|
|
%else
|
2021-06-09 16:04:46 +00:00
|
|
|
%pyproject_wheel
|
2022-03-09 18:57:57 +00:00
|
|
|
%endif
|
2021-06-09 16:04:46 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
export PBR_VERSION="0.0.0"
|
2022-03-09 19:33:34 +00:00
|
|
|
%if 0{?rhel} <= 8
|
2022-03-09 18:57:57 +00:00
|
|
|
%py3_install
|
|
|
|
%else
|
2021-06-09 16:04:46 +00:00
|
|
|
%pyproject_install
|
|
|
|
%pyproject_save_files %{pypi_name}
|
2022-03-09 18:57:57 +00:00
|
|
|
%endif
|
2021-06-09 16:04:46 +00:00
|
|
|
|
|
|
|
%files -n python%{python3_pkgversion}-%{pypi_name} -f %{pyproject_files}
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
|
|
|
|
|
|
|
%changelog
|
2022-01-27 19:09:29 +00:00
|
|
|
%autochangelog
|