%global srcname podman %global pkgsuf podman-api # https://github.com/containers/python-podman %global git https://github.com/containers/python-%{srcname} %global commit d0a45fea27f3c1b1c481b05e1531adc168f1881e %global snapshot_date 20190613 %global shortcommit %(c=%{commit}; echo ${c:0:7}) # Several tests require internet conection or journald to be running # Let's disable checking for now %global with_tests 0 # We name the package python-podman-api since there is an upstream intent to # move to this namespace Name: python-%{pkgsuf} # See https://github.com/containers/python-podman/issues/27 Version: 0.0.0 Release: 0.1.%{snapshot_date}git%{shortcommit}%{?dist} Summary: Python bindings for using Varlink access to Podman Service License: ASL 2.0 URL: %{git} Source0: %{git}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz BuildArch: noarch %description %{summary} %package -n python3-%{pkgsuf} Summary: %{summary} BuildRequires: python3-devel BuildRequires: python3-setuptools %if 0%{?with_tests} BuildRequires: podman BuildRequires: python3-psutil BuildRequires: python3-dateutil BuildRequires: python3-varlink %endif %{?python_provide:%python_provide python3-%{pkgsuf}} %description -n python3-%{pkgsuf} %{summary} %prep %setup -q -n python-%{srcname}-%{commit} %if 0%{?with_tests} # skip (am I root?) user check sed -i 's/exit 2/echo/' test/test_runner.sh %endif # Fix example shebangs sed -i '1 s|/usr/bin/env python3|/usr/bin/python3|' examples/*.py %build %py3_build %install %py3_install %check %if 0%{?with_tests} /usr/bin/bash test/test_runner.sh %endif %files -n python3-%{pkgsuf} %license LICENSE %doc README.md examples CHANGES.txt %{python3_sitelib}/%{srcname}/ %{python3_sitelib}/%{srcname}-*.egg-info/ %changelog * Thu Jun 13 2019 Athos Ribeiro - 0.0.0-0.1.20190613gitd0a45fe - Initial package