2022-05-27 19:21:42 +00:00
|
|
|
%if "%{_vendor}" == "debbuild"
|
|
|
|
%global python3_pkgversion 3
|
|
|
|
%endif
|
|
|
|
|
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-09-09 13:15:58 +00:00
|
|
|
%global pypi_dist 4
|
2022-08-17 19:56:57 +00:00
|
|
|
%global built_tag_strip 4.2.0
|
2021-08-12 12:46:22 +00:00
|
|
|
|
2021-06-09 16:04:46 +00:00
|
|
|
Name: python-%{pypi_name}
|
|
|
|
Epoch: 3
|
2022-08-10 14:03:16 +00:00
|
|
|
Version: 4.2.0
|
2022-05-27 19:21:42 +00:00
|
|
|
%if "%{_vendor}" == "debbuild"
|
2022-09-09 13:15:58 +00:00
|
|
|
Packager: Podman Debbuild Maintainers <https://github.com/orgs/containers/teams/podman-debbuild-maintainers>
|
2022-05-27 19:21:42 +00:00
|
|
|
License: ASL-2.0
|
|
|
|
Release: 0%{?dist}
|
|
|
|
%else
|
|
|
|
License: ASL 2.0
|
2022-01-27 19:09:29 +00:00
|
|
|
Release: %autorelease
|
2022-05-27 19:21:42 +00:00
|
|
|
%endif
|
2021-06-09 16:04:46 +00:00
|
|
|
Summary: RESTful API for Podman
|
|
|
|
URL: https://github.com/containers/%{pypi_name}-py
|
2022-08-17 19:56:57 +00:00
|
|
|
Source0: %{url}/releases/download/v%{built_tag_strip}/%{pypi_name}-%{version}.tar.gz
|
2021-06-09 16:04:46 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description
|
|
|
|
%desc
|
|
|
|
|
|
|
|
%package -n python%{python3_pkgversion}-%{pypi_name}
|
2022-05-27 19:21:42 +00:00
|
|
|
%if "%{_vendor}" == "debbuild"
|
|
|
|
BuildRequires: git
|
|
|
|
BuildRequires: python%{python3_pkgversion}-dev
|
|
|
|
%else
|
2021-06-09 16:04:46 +00:00
|
|
|
BuildRequires: git-core
|
2022-03-09 18:36:36 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
2022-05-27 19:21:42 +00:00
|
|
|
%endif
|
|
|
|
%if ("%{_vendor}" == "debbuild") || (! 0%{?fedora} && 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}-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}-requests
|
2022-03-09 19:14:51 +00:00
|
|
|
%else
|
|
|
|
BuildRequires: pyproject-rpm-macros
|
2022-03-09 18:36:36 +00:00
|
|
|
%endif
|
2022-06-14 13:44:37 +00:00
|
|
|
%if "%{_vendor}" == "debbuild"
|
2022-06-14 13:22:34 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-xdg
|
|
|
|
Requires: python%{python3_pkgversion}-xdg
|
2022-08-17 19:56:57 +00:00
|
|
|
%else
|
|
|
|
%if 0%{?centos} <= 8
|
2022-06-14 13:22:34 +00:00
|
|
|
BuildRequires: python%{python3_pkgversion}-pyxdg
|
|
|
|
Requires: python%{python3_pkgversion}-pyxdg
|
|
|
|
%endif
|
2022-03-09 20:13:51 +00:00
|
|
|
%if 0%{?fedora} == 35
|
|
|
|
BuildRequires: python%{python3_pkgversion}-toml
|
|
|
|
Requires: python%{python3_pkgversion}-toml
|
|
|
|
%endif
|
2022-08-17 19:56:57 +00:00
|
|
|
%endif
|
2021-06-09 16:04:46 +00:00
|
|
|
Provides: %{pypi_name}-py = %{version}-%{release}
|
2022-09-09 13:15:58 +00:00
|
|
|
Provides: python%{python3_pkgversion}dist(%{pypi_name}) = %{pypi_dist}
|
|
|
|
Provides: python%{python3_version}dist(%{pypi_name}) = %{pypi_dist}
|
2022-09-15 12:39:34 +00:00
|
|
|
Conflicts: python%{python3_pkgversion}-%{pypi_name}-api <= 0.0.0-1
|
|
|
|
Obsoletes: python%{python3_pkgversion}-%{pypi_name}-api <= 0.0.0-1
|
2021-06-09 16:04:46 +00:00
|
|
|
Summary: %{summary}
|
|
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
|
|
|
|
|
|
|
|
%description -n python%{python3_pkgversion}-%{pypi_name}
|
|
|
|
%desc
|
|
|
|
|
|
|
|
%prep
|
2022-08-17 19:56:57 +00:00
|
|
|
%autosetup -Sgit -n %{pypi_name}-%{built_tag_strip}
|
2021-06-09 16:04:46 +00:00
|
|
|
|
2022-03-09 19:53:39 +00:00
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 9
|
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-05-27 19:21:42 +00:00
|
|
|
%if "%{_vendor}" == "debbuild"
|
|
|
|
python3 setup.py sdist bdist
|
|
|
|
%else
|
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
|
2022-05-27 19:21:42 +00:00
|
|
|
%endif
|
2021-06-09 16:04:46 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
export PBR_VERSION="0.0.0"
|
2022-05-27 19:21:42 +00:00
|
|
|
%if "%{_vendor}" == "debbuild"
|
|
|
|
python3 setup.py install --root %{buildroot}
|
|
|
|
%else
|
2022-03-09 19:37:59 +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
|
2022-05-27 19:21:42 +00:00
|
|
|
%endif
|
2021-06-09 16:04:46 +00:00
|
|
|
|
2022-03-09 20:06:26 +00:00
|
|
|
%if 0%{?rhel} <= 8
|
|
|
|
%files -n python3-podman
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
|
|
|
%{python3_sitelib}/podman/*
|
|
|
|
%{python3_sitelib}/podman-*/*
|
|
|
|
%else
|
2021-06-09 16:04:46 +00:00
|
|
|
%files -n python%{python3_pkgversion}-%{pypi_name} -f %{pyproject_files}
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
2022-03-09 20:06:26 +00:00
|
|
|
%endif
|
2021-06-09 16:04:46 +00:00
|
|
|
|
|
|
|
%changelog
|
2022-05-27 19:21:42 +00:00
|
|
|
%if "%{_vendor}" != "debbuild"
|
2022-01-27 19:09:29 +00:00
|
|
|
%autochangelog
|
2022-05-27 19:21:42 +00:00
|
|
|
%endif
|