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