]> git.pld-linux.org Git - packages/python-docker.git/blame_incremental - python-docker.spec
up to 5.0.0
[packages/python-docker.git] / python-docker.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_with tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module docker
8%define egg_name docker
9%define pypi_name docker
10Summary: A Python library for the Docker Engine API
11Name: python-%{module}
12Version: 5.0.0
13Release: 1
14License: Apache v2.0
15Group: Libraries/Python
16Source0: https://files.pythonhosted.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
17# Source0-md5: 9cc5156a2ff6458a8f52114b9bbc0d7e
18Patch0: unpin-requirements.patch
19URL: http://docker-py.readthedocs.org/
20BuildRequires: rpm-pythonprov
21BuildRequires: rpmbuild(macros) >= 1.710
22%if %{with python2}
23BuildRequires: python-modules
24BuildRequires: python-pip
25BuildRequires: python-setuptools
26BuildConflicts: python-docker < 2.0
27%endif
28%if %{with python3}
29BuildRequires: python3-modules
30BuildRequires: python3-pip
31BuildRequires: python3-setuptools
32BuildConflicts: python3-docker < 2.0
33%endif
34# Docker can be remote, so suggest only
35Suggests: docker >= 1.3.3
36# optional dep for ssh support (required by docker-compose)
37Suggests: python-paramiko >= 2.4.2
38BuildArch: noarch
39BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40
41# http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2016-May/024868.html
42%define _noautoreq_py3egg backports.ssl-match-hostname ipaddress
43
44%description
45A Python 2 library for the Docker Engine API. It lets you do anything
46the `docker` command does, but from within Python apps - run
47containers, manage containers, manage Swarms, etc.
48
49%package -n python3-%{module}
50Summary: An API client for docker written in Python 3
51Group: Libraries/Python
52# Docker can be remote, so suggest only
53Suggests: docker >= 1.3.3
54# optional dep for ssh support (required by docker-compose)
55Suggests: python3-paramiko >= 2.4.2
56
57%description -n python3-%{module}
58A Python 3 library for the Docker Engine API. It lets you do anything
59the `docker` command does, but from within Python apps - run
60containers, manage containers, manage Swarms, etc.
61
62%prep
63%setup -q -n %{pypi_name}-%{version}
64%patch0 -p1
65
66%build
67%if %{with python2}
68%py_build %{?with_tests:test}
69%endif
70
71%if %{with python3}
72%py3_build %{?with_tests:test}
73%endif
74
75%install
76rm -rf $RPM_BUILD_ROOT
77%if %{with python2}
78%py_install
79%py_postclean
80%endif
81
82%if %{with python3}
83%py3_install
84%endif
85
86%clean
87rm -rf $RPM_BUILD_ROOT
88
89%if %{with python2}
90%files
91%defattr(644,root,root,755)
92%doc LICENSE README.md
93%{py_sitescriptdir}/%{module}
94%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
95%endif
96
97%if %{with python3}
98%files -n python3-%{module}
99%defattr(644,root,root,755)
100%doc LICENSE README.md
101%{py3_sitescriptdir}/%{module}
102%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
103%endif
This page took 0.053754 seconds and 4 git commands to generate.