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