github.com/containers/podman/v2@v2.2.2-0.20210501105131-c1e07d070c4c/contrib/spec/python-podman.spec.in (about) 1 # If any of the following macros should be set otherwise, 2 # you can wrap any of them with the following conditions: 3 # - %%if 0%%{?centos} == 7 4 # - %%if 0%%{?rhel} == 7 5 # - %%if 0%%{?fedora} == 23 6 # Or just test for particular distribution: 7 # - %%if 0%%{?centos} 8 # - %%if 0%%{?rhel} 9 # - %%if 0%%{?fedora} 10 # 11 # Be aware, on centos, both %%rhel and %%centos are set. If you want to test 12 # rhel specific macros, you can use %%if 0%%{?rhel} && 0%%{?centos} == 0 condition. 13 # (Don't forget to replace double percentage symbol with single one in order to apply a condition) 14 15 %undefine _enable_debug_packages 16 17 %global provider github 18 %global provider_tld com 19 %global project containers 20 %global repo libpod 21 # https://github.com/containers/podman 22 %global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo} 23 %global import_path %{provider_prefix} 24 %global commit #COMMIT# 25 %global shortcommit %(c=%{commit}; echo ${c:0:7}) 26 27 Name: python3-podman 28 Version: 0.7.3 29 Release: #COMMITDATE#.git%{shortcommit}%{?dist} 30 Summary: Python 3 bindings and client for podman 31 License: ASL 2.0 32 URL: https://%{provider_prefix} 33 Source0: https://api.%{provider}.%{provider_tld}/repos/%{project}/%{repo}/tarball/%{commit} 34 35 BuildArch: noarch 36 BuildRequires: git 37 BuildRequires: python3-devel 38 BuildRequires: python3-setuptools 39 BuildRequires: python3-varlink 40 41 Requires: python3-humanize 42 Requires: python3-pytoml 43 Requires: python3-setuptools 44 Requires: python3-varlink 45 Requires: python3-psutil 46 Requires: podman 47 48 %if 0%{?fedora} 49 # 2018-07-20 RHEL8 doesn't have varlink RPM yet 50 Requires: python3-varlink 51 %endif 52 53 Provides: %{name} = %{version}-%{release} 54 55 %description 56 %{summary} 57 python3-podman provides python bindings and client for communicating 58 with podman as a service. 59 60 %prep 61 %autosetup -Sgit -n %{project}-%{repo}-%{shortcommit} 62 63 %build 64 export PODMAN_VERSION=%{version} 65 66 pushd contrib/python/podman 67 %{__python3} setup.py build 68 popd 69 70 pushd contrib/python/pypodman 71 %{__python3} setup.py build 72 popd 73 74 %install 75 export PODMAN_VERSION=%{version} 76 77 install -d -m 755 %{buildroot}%{_mandir}/man1 78 79 pushd contrib/python/pypodman 80 install -m 644 -t %{buildroot}%{_mandir}/man1 docs/man1/*.1 81 %{__python3} setup.py install --skip-build --root %{buildroot} 82 popd 83 84 pushd contrib/python/podman 85 %{__python3} setup.py install --skip-build --root %{buildroot} 86 popd 87 88 89 %check 90 #define license tag if not already defined 91 %{!?_licensedir:%global license %doc} 92 93 %files 94 %license LICENSE 95 %doc README.md CONTRIBUTING.md install.md CODE-OF-CONDUCT.md transfer.md 96 %{_bindir}/pypodman 97 %{_mandir}/man1/pypodman.1* 98 %dir %{python3_sitelib}/podman 99 %dir %{python3_sitelib}/pypodman 100 %{python3_sitelib}/podman/* 101 %{python3_sitelib}/pypodman/* 102 %{python3_sitelib}/podman-%{version}*.egg-info 103 %{python3_sitelib}/pypodman-%{version}*.egg-info 104 105 %changelog