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