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