]> git.pld-linux.org Git - packages/python-docker.git/blame - python-docker.spec
new, version 0.7.1
[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
5%bcond_without python3 # CPython 3.x module
6
7%define module docker
8Summary: An API client for docker written in Python
9Name: python-%{module}
10Version: 0.7.1
11Release: 1
12License: Apache v2.0
13Group: Libraries/Python
14Source0: https://pypi.python.org/packages/source/d/docker-py/docker-py-%{version}.tar.gz
15# Source0-md5: 3950ac21f7f2a9723759dd95e5f77b89
16URL: http://docker-py.readthedocs.org/
17#BuildRequires: docker >= 1.3.3
18BuildRequires: rpm-pythonprov
19BuildRequires: rpmbuild(macros) >= 1.219
20%if %{with python2}
21BuildRequires: python-requests >= 2.2.1
22BuildRequires: python-setuptools
23#BuildRequires: python-tools
24#BuildRequires: python-websocket-client >= 0.11.0
25%endif
26%if %{with python3}
27BuildRequires: python3-devel
28BuildRequires: python3-requests
29BuildRequires: python3-setuptools
30#BuildRequires: python3-tools
31#BuildRequires: python3-websocket-client >= 0.11.0
32%endif
33Requires: docker >= 1.3.3
34Requires: python-requests >= 2.2.1
35Requires: python-six >= 1.3.0
36Requires: python-websocket-client >= 0.11.0
37BuildArch: noarch
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
41An API client for docker written in Python.
42
43%package -n python3-%{module}
44Summary: An API client for docker written in Python 3
45Requires: python3-requests
46Requires: python3-six >= 1.3.0
47Requires: python3-websocket-client >= 0.11.0
48
49%description -n python3-%{module}
50A Python 3 interface to Docker.
51
52%prep
53%setup -q -n docker-py-%{version}
54
55%if %{with python3}
56set -- *
57install -d py3
58cp -a "$@" py3
59find py3 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
60%endif
61
62%build
63%if %{with python2}
64%{__python} setup.py build %{?with_tests:test}
65%endif
66
67%if %{with python3}
68cd py3
69%{__python3} setup.py build %{?with_tests:test}
70%endif
71
72%install
73rm -rf $RPM_BUILD_ROOT
74%if %{with python2}
75%{__python} setup.py install --skip-build \
76 --optimize=2 \
77 --root=$RPM_BUILD_ROOT
78
79%py_postclean
80%endif
81
82%if %{with python3}
83cd py3
84%{__python3} setup.py install --skip-build \
85 --optimize=2 \
86 --root=$RPM_BUILD_ROOT
87%endif
88
89%clean
90rm -rf $RPM_BUILD_ROOT
91
92%if %{with python2}
93%files
94%defattr(644,root,root,755)
95%doc LICENSE README.md
96%{py_sitescriptdir}/%{module}
97%{py_sitescriptdir}/docker_py-%{version}-py*.egg-info
98%endif
99
100%if %{with python3}
101%files -n python3-%{module}
102%defattr(644,root,root,755)
103%doc LICENSE README.md
104%{py3_sitescriptdir}/%{module}
105%{py3_sitescriptdir}/docker_py-%{version}-py*.egg-info
106%endif
This page took 0.095588 seconds and 4 git commands to generate.