diff --git a/python-podman.spec b/python-podman.spec index cfc0c74..0dc1fa7 100644 --- a/python-podman.spec +++ b/python-podman.spec @@ -1,49 +1,106 @@ -Name: python-podman +# RHEL 8 envs has slightly different python deps +# and also doesn't support dynamic (build)requires. +%if %{defined rhel} && 0%{?rhel} == 8 +%define rhel8_py 1 +%endif + +%global pypi_name podman +%global desc %{pypi_name} is a library of bindings to use the RESTful API for Podman. + +%global pypi_dist 4 + +Name: python-%{pypi_name} +%if %{defined copr_username} +Epoch: 102 +%else Epoch: 3 -Version: 5.5.0 +%endif +# DO NOT TOUCH the Version string! +# The TRUE source of this specfile is: +# https://github.com/containers/podman/blob/main/rpm/python-podman.spec +# If that's what you're reading, Version must be 0, and will be updated by Packit for +# copr and koji builds. +# If you're reading this on dist-git, the version is automatically filled in by Packit. +Version: 5.6.0 Release: 1%{?dist} +License: Apache-2.0 Summary: RESTful API for Podman -License: ASL 2.0 -URL: https://github.com/containers/podman-py -Source0: https://github.com/containers/podman-py/archive/refs/tags/v%{version}.tar.gz +URL: https://github.com/containers/%{pypi_name}-py +# Tarball fetched from upstream +Source0: %{url}/archive/v%{version}.tar.gz BuildArch: noarch %description -%{name} is a library of bindings to use the RESTful API for Podman. +%desc -%package -n python%{python3_pkgversion}-podman +%package -n python%{python3_pkgversion}-%{pypi_name} BuildRequires: git-core BuildRequires: python%{python3_pkgversion}-devel +%if %{defined rhel8_py} +BuildRequires: python%{python3_pkgversion}-rpm-macros +BuildRequires: python%{python3_pkgversion}-pytoml +BuildRequires: python%{python3_pkgversion}-requests +Requires: python%{python3_pkgversion}-pytoml +Requires: python%{python3_pkgversion}-requests +%else BuildRequires: pyproject-rpm-macros -Provides: podman-py = %{version}-%{release} +%endif +Provides: %{pypi_name}-py = %{epoch}:%{version}-%{release} +Provides: python%{python3_pkgversion}dist(%{pypi_name}) = %{pypi_dist} +Provides: python%{python3_version}dist(%{pypi_name}) = %{pypi_dist} +Obsoletes: python%{python3_pkgversion}-%{pypi_name}-api <= 0.0.0-1 +Provides: python%{python3_pkgversion}-%{pypi_name}-api = %{epoch}:%{version}-%{release} Summary: %{summary} -%{?python_provide:%python_provide python%{python3_pkgversion}-podman} +%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}} -%description -n python%{python3_pkgversion}-podman -%{name} is a library of bindings to use the RESTful API for Podman. +%description -n python%{python3_pkgversion}-%{pypi_name} +%desc %prep -%autosetup -Sgit_am -n podman-py-%{version} +%autosetup -Sgit -n %{pypi_name}-py-%{version} +%if !%{defined rhel8_py} %generate_buildrequires %pyproject_buildrequires %{?with_tests:-t} +%endif %build export PBR_VERSION="0.0.0" +%if %{defined rhel8_py} +%py3_build +%else %pyproject_wheel +%endif %install export PBR_VERSION="0.0.0" +%if %{defined rhel8_py} +%py3_install +%else %pyproject_install -%pyproject_save_files podman +%pyproject_save_files %{pypi_name} +%endif %check -%files -n python%{python3_pkgversion}-podman -f %{pyproject_files} +%if %{defined rhel8_py} +%files -n python%{python3_pkgversion}-%{pypi_name} +%dir %{python3_sitelib}/%{pypi_name}-*-py%{python3_version}.egg-info +%{python3_sitelib}/%{pypi_name}-*-py%{python3_version}.egg-info/* +%dir %{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/%{pypi_name}/* +%else +%pyproject_extras_subpkg -n python%{python3_pkgversion}-%{pypi_name} progress_bar +%files -n python%{python3_pkgversion}-%{pypi_name} -f %{pyproject_files} +%endif %license LICENSE %doc README.md %changelog +* Tue Sep 16 2025 Jindrich Novy - 3:5.6.0-1 +- update to https://github.com/containers/podman-py/releases/tag/v5.6.0 +- Related: RHEL-111919 + * Fri Jun 20 2025 Jindrich Novy - 3:5.5.0-1 - update to https://github.com/containers/podman-py/releases/tag/v5.5.0 - Related: RHEL-80816 diff --git a/sources b/sources index 6478073..8d36bf5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (v5.5.0.tar.gz) = a48253375e90f426baf046bdffc3df3ee8dc4e66a0ccacf55d86cb847b1937a1135f3518b5ad5e9ddd50f11800e97bd5454ec2098535ccf7f06d7210a0cd63ba +SHA512 (v5.6.0.tar.gz) = a5f4d1368221ea68202c1413f54493307fd2220ae386bc23690fa5997d6fb974f41a528f2a74aca92588b5c3aa121b492365356ecebc8a9a09245e07ae4905c3