%if 0%{?fedora} %global with_python3 1 %endif #fedora # disable debug package cause archful %global debug_package %{nil} Name: python-docker-py Version: 0.7.1 Release: 1%{?dist} Summary: An API client for docker written in Python License: ASL 2.0 URL: http://www.docker.com # Arch follows docker-io # only x86_64 for now: https://github.com/dotcloud/docker/issues/136 ExclusiveArch: x86_64 Source0: https://pypi.python.org/packages/source/d/docker-py/docker-py-%{version}.tar.gz BuildRequires: python2-devel BuildRequires: python-setuptools BuildRequires: python-tools BuildRequires: python-websocket-client >= 0.11.0 %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-tools BuildRequires: python3-setuptools BuildRequires: python3-requests BuildRequires: python3-websocket-client >= 0.11.0 %endif # with_python3 # Resolves: rhbz#1132604 (epel7 only) # docker 1.3.2 suffered from a few CVEs, ensure 1.3.3+ %if 0%{?fedora} >= 21 || 0%{?rhel} >= 7 BuildRequires: docker >= 1.3.3 Requires: docker >= 1.3.3 %else BuildRequires: docker-io >= 1.3.3 Requires: docker-io >= 1.3.3 %endif %if 0%{?fedora} >= 21 BuildRequires: python-requests >= 2.2.1 Requires: python-requests >= 2.2.1 %else BuildRequires: python-requests Requires: python-requests %endif Requires: python-websocket-client >= 0.11.0 Requires: python-six >= 1.3.0 %description %{summary} %if 0%{?with_python3} %package -n python3-docker-py Requires: python3-websocket-client >= 0.11.0 Requires: python3-requests Requires: python3-six >= 1.3.0 Summary: An API client for docker written in Python 3 %description -n python3-docker-py A Python 3 interface to Docker %endif # with_python3 %prep %setup -q -n docker-py-%{version} %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} pushd %{py3dir} find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|' popd %endif # with_python3 %build %{__python} setup.py build %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py build popd %endif # with_python3 %install %{__python} setup.py install --root %{buildroot} %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install --root %{buildroot} popd %endif # with_python3 %files %doc LICENSE README.md %dir %{python_sitelib}/docker %dir %{python_sitelib}/docker_py-%{version}-py2*.egg-info %{python_sitelib}/docker/* %{python_sitelib}/docker_py-%{version}-py2*.egg-info/* %if 0%{?with_python3} %files -n python3-docker-py %doc LICENSE README.md %dir %{python3_sitelib}/docker %dir %{python3_sitelib}/docker_py-%{version}-py3*.egg-info %{python3_sitelib}/docker/* %{python3_sitelib}/docker_py-%{version}-py3*.egg-info/* %endif # with_python3 %changelog * Wed Jan 14 2015 Lokesh Mandvekar - 0.7.1-1 - Resolves: rhbz#1182003 - Update to 0.7.1 * Thu Dec 25 2014 Igor Gnatenko - 0.7.0-1 - Update to 0.7.0 (RHBZ #1176950) * Mon Dec 01 2014 Tomas Radej - 0.6.0-2 - Added Python 3 subpackage * Fri Nov 21 2014 Lokesh Mandvekar - 0.6.0-1 - Resolves: rhbz#1160293 - update to 0.6.0 * Thu Oct 23 2014 Lokesh Mandvekar - 0.5.3-2 - Resolves: rhbz#1145895 - versioned python-requests req only for f21+ * Wed Oct 22 2014 Lokesh Mandvekar - 0.5.3-1 - Resolves: rhbz#1153991 - update to 0.5.3 * Tue Sep 23 2014 Tom Prince - 0.5.0-2 - Specify depedencies to match those in setup.py * Mon Sep 22 2014 Tom Prince - 0.5.0-1 - Resolves: rhbz#1145511 - version bump to 0.5.0 * Tue Aug 26 2014 Lokesh Mandvekar - 0.4.0-3 - correct bogus date * Tue Aug 26 2014 Lokesh Mandvekar - 0.4.0-2 - rewrite BR&R conditionals for docker/docker-io * Thu Aug 21 2014 Lokesh Mandvekar - 0.4.0-1 - update to 0.4.0 - Resolves: rhbz#1132604 (epel7 only) * Sun Aug 17 2014 Fedora Release Engineering - 0.3.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sat Jul 12 2014 Lokesh Mandvekar - 0.3.2-1 - version bump to 0.3.2 - Resolves: rhbz#1097415 * Sat Jun 07 2014 Fedora Release Engineering - 0.2.3-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Mon Feb 10 2014 Lokesh Mandvekar 0.2.3-8 - Bug 1063369 - Fix APIError for python-requests-1.1 on rhel6 * Sat Feb 08 2014 Lokesh Mandvekar 0.2.3-7 - Bug 1048667 - disable debug package cause archful * Fri Feb 07 2014 Lokesh Mandvekar 0.2.3-6 - doesn't need python-mock at runtime * Thu Jan 09 2014 Lokesh Mandvekar 0.2.3-5 - python3 to be added after python3-websocket-client (BZ 1049424) * Tue Jan 07 2014 Lokesh Mandvekar 0.2.3-4 - double '%' to comment macros - check section not considered for now - python3- description in python3- subpackage conditional * Tue Jan 07 2014 Lokesh Mandvekar 0.2.3-3 - Everything goes in main package - python3 package requires corrected - package name python-docker-py - both packages require docker-io * Mon Jan 06 2014 Lokesh Mandvekar 0.2.3-2 - python3 subpackage - upstream uses PyPI - package owns directories it creates - build and runtime deps updated * Sun Jan 05 2014 Lokesh Mandvekar 0.2.3-1 - Initial fedora package