]> git.pld-linux.org Git - packages/python-docker.git/blame - python-docker.spec
- enable python3 module and filter bogus deps
[packages/python-docker.git] / python-docker.spec
CommitLineData
bdab460e
ER
1#
2# Conditional build:
3%bcond_with tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
b76f207d 5%bcond_without python3 # CPython 3.x module
bdab460e 6
b76f207d 7%define module docker
bdab460e
ER
8Summary: An API client for docker written in Python
9Name: python-%{module}
fd4f3d6f 10Version: 1.8.1
b76f207d 11Release: 3
bdab460e
ER
12License: Apache v2.0
13Group: Libraries/Python
fd4f3d6f
ER
14Source0: https://pypi.python.org/packages/d9/af/4c4edd438a1d132a30c7877d929841a6b8e843ee281f41d91500ad7fac65/docker-py-%{version}.tar.gz
15# Source0-md5: 555ed9ed5f9ce36d694aa9449523d2d8
99b90030 16Patch0: unpin-test-requirements.patch
bdab460e 17URL: http://docker-py.readthedocs.org/
bdab460e 18BuildRequires: rpm-pythonprov
14f49d80 19BuildRequires: rpmbuild(macros) >= 1.710
bdab460e 20%if %{with python2}
bdab460e 21BuildRequires: python-setuptools
bdab460e
ER
22%endif
23%if %{with python3}
932cfb73 24BuildRequires: python3-modules
bdab460e 25BuildRequires: python3-setuptools
bdab460e 26%endif
99b90030
ER
27# Docker can be remote, so suggest only
28Suggests: docker >= 1.3.3
bdab460e
ER
29BuildArch: noarch
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
b76f207d
JR
32# http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2016-May/024868.html
33%define __noautoreq python3egg\\\\(backports.ssl-match-hostname\\\\) python3egg\\\\(ipaddress\\\\)
34
bdab460e 35%description
fd4f3d6f
ER
36A Python 2 library for the Docker Remote API. It does everything the
37`docker` command does, but from within Python - run containers, manage
38them, pull/push images, etc.
bdab460e
ER
39
40%package -n python3-%{module}
41Summary: An API client for docker written in Python 3
fd4f3d6f 42Group: Libraries/Python
99b90030
ER
43# Docker can be remote, so suggest only
44Suggests: docker >= 1.3.3
bdab460e
ER
45
46%description -n python3-%{module}
fd4f3d6f
ER
47A Python 3 library for the Docker Remote API. It does everything the
48`docker` command does, but from within Python - run containers, manage
49them, pull/push images, etc.
bdab460e
ER
50
51%prep
52%setup -q -n docker-py-%{version}
99b90030 53%patch0 -p1
bdab460e 54
bdab460e
ER
55%build
56%if %{with python2}
e1c7d18e 57%py_build %{?with_tests:test}
bdab460e
ER
58%endif
59
60%if %{with python3}
e1c7d18e 61%py3_build %{?with_tests:test}
bdab460e
ER
62%endif
63
64%install
65rm -rf $RPM_BUILD_ROOT
66%if %{with python2}
e1c7d18e 67%py_install
bdab460e
ER
68
69%py_postclean
70%endif
71
72%if %{with python3}
e1c7d18e 73%py3_install
bdab460e
ER
74%endif
75
76%clean
77rm -rf $RPM_BUILD_ROOT
78
79%if %{with python2}
80%files
81%defattr(644,root,root,755)
82%doc LICENSE README.md
83%{py_sitescriptdir}/%{module}
84%{py_sitescriptdir}/docker_py-%{version}-py*.egg-info
85%endif
86
87%if %{with python3}
88%files -n python3-%{module}
89%defattr(644,root,root,755)
90%doc LICENSE README.md
91%{py3_sitescriptdir}/%{module}
92%{py3_sitescriptdir}/docker_py-%{version}-py*.egg-info
93%endif
This page took 0.081497 seconds and 4 git commands to generate.