]> git.pld-linux.org Git - packages/python-docker.git/blame - python-docker.spec
semi-automatic change: use py_build/py_install macros
[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}
a059284d 21#BuildRequires: python-requests >= 2.2.1
bdab460e
ER
22BuildRequires: python-setuptools
23#BuildRequires: python-tools
24#BuildRequires: python-websocket-client >= 0.11.0
25%endif
26%if %{with python3}
27BuildRequires: python3-devel
a059284d 28#BuildRequires: python3-requests
bdab460e
ER
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
bdab460e
ER
55%build
56%if %{with python2}
e1c7d18e 57%py_build %{?with_tests:test}
bdab460e
ER
58%endif
59
60%if %{with python3}
e1c7d18e 61%py3_build %{?with_tests:test}
bdab460e
ER
62%endif
63
64%install
65rm -rf $RPM_BUILD_ROOT
66%if %{with python2}
e1c7d18e 67%py_install
bdab460e
ER
68
69%py_postclean
70%endif
71
72%if %{with python3}
e1c7d18e 73%py3_install
bdab460e
ER
74%endif
75
76%clean
77rm -rf $RPM_BUILD_ROOT
78
79%if %{with python2}
80%files
81%defattr(644,root,root,755)
82%doc LICENSE README.md
83%{py_sitescriptdir}/%{module}
84%{py_sitescriptdir}/docker_py-%{version}-py*.egg-info
85%endif
86
87%if %{with python3}
88%files -n python3-%{module}
89%defattr(644,root,root,755)
90%doc LICENSE README.md
91%{py3_sitescriptdir}/%{module}
92%{py3_sitescriptdir}/docker_py-%{version}-py*.egg-info
93%endif
This page took 0.100001 seconds and 4 git commands to generate.