[packages/python-docker] - reverted to 4.4.4, epoch 1; docker 5 is python3-only
qboosh
qboosh at pld-linux.org
Tue Oct 31 07:06:26 CET 2023
commit 7d5980d3732efda109958dbc18d5d638b52bbe65
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Tue Oct 31 05:35:54 2023 +0100
- reverted to 4.4.4, epoch 1; docker 5 is python3-only
python-docker.spec | 96 +++++++++++-------------------------------------
unpin-requirements.patch | 23 +++---------
2 files changed, 27 insertions(+), 92 deletions(-)
---
diff --git a/python-docker.spec b/python-docker.spec
index b356a87..1b841d7 100644
--- a/python-docker.spec
+++ b/python-docker.spec
@@ -1,8 +1,6 @@
#
# Conditional build:
-%bcond_with tests # unit/integration tests
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
+%bcond_without tests # unit tests
%define module docker
%define egg_name docker
@@ -10,36 +8,30 @@
Summary: A Python 2 library for the Docker Engine API
Summary(pl.UTF-8): Biblioteka Pythona 2 do API silnika Docker
Name: python-%{module}
-Version: 5.0.0
-Release: 4
+Version: 4.4.4
+Release: 3
+Epoch: 1
License: Apache v2.0
Group: Libraries/Python
-Source0: https://files.pythonhosted.org/packages/source/d/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
-# Source0-md5: 9cc5156a2ff6458a8f52114b9bbc0d7e
+Source0: https://files.pythonhosted.org/packages/source/d/docker/%{pypi_name}-%{version}.tar.gz
+# Source0-md5: e52f862b113d14c684a6e7dfa3d9e11c
Patch0: unpin-requirements.patch
URL: http://docker-py.readthedocs.org/
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.710
-%if %{with python2}
-BuildRequires: python-modules >= 1:3.6
-BuildRequires: python-setuptools
+BuildRequires: python-modules >= 1:2.7
+BuildRequires: python-setuptools >= 1:42
%if %{with tests}
+BuildRequires: python-ipaddress >= 1.0.16
+BuildRequires: python-backports-ssl_match_hostname >= 3.5
BuildRequires: python-pytest >= 4.3.1
-BuildRequires: python-requests >= 2.18.1
-BuildRequires: python-websocket-client >= 0.32.0
+BuildRequires: python-pytest-timeout >= 1.3.3
+BuildRequires: python-requests >= 2.20.0
+BuildRequires: python-six >= 1.10.0
+BuildRequires: python-urllib3 >= 1.24.3
+BuildRequires: python-websocket-client >= 0.56.0
%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
BuildConflicts: python-docker < 2.0
-%endif
-%if %{with python3}
-BuildRequires: python3-modules >= 1:3.6
-BuildRequires: python3-setuptools
-%if %{with tests}
-BuildRequires: python3-pytest >= 4.3.1
-BuildRequires: python3-requests >= 2.18.1
-BuildRequires: python3-websocket-client >= 0.32.0
-%endif
-BuildConflicts: python3-docker < 2.0
-%endif
# Docker can be remote, so suggest only
Suggests: docker >= 1.3.3
# optional dep for ssh support (required by docker-compose)
@@ -47,9 +39,6 @@ Suggests: python-paramiko >= 2.4.2
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-# http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2016-May/024868.html
-%define _noautoreq_py3egg backports.ssl-match-hostname ipaddress
-
%description
A Python library for the Docker Engine API. It lets you do anything
the `docker` command does, but from within Python apps - run
@@ -60,75 +49,32 @@ Biblioteka Pythona do API silnika Docker. Pozwala zrobić wszystko to,
co polecenie "docker", ale z poziomu aplikacji w Pythonie: uruchamiać
kontenery, zarządzać nimi, zarządzać Swarmami itp.
-%package -n python3-%{module}
-Summary: A Python 3 library for the Docker Engine API
-Summary(pl.UTF-8): Biblioteka Pythona 3 do API silnika Docker
-Group: Libraries/Python
-# Docker can be remote, so suggest only
-Suggests: docker >= 1.3.3
-# optional dep for ssh support (required by docker-compose)
-Suggests: python3-paramiko >= 2.4.2
-
-%description -n python3-%{module}
-A Python library for the Docker Engine API. It lets you do anything
-the `docker` command does, but from within Python apps - run
-containers, manage containers, manage Swarms, etc.
-
-%description -n python3-%{module} -l pl.UTF-8
-Biblioteka Pythona do API silnika Docker. Pozwala zrobić wszystko to,
-co polecenie "docker", ale z poziomu aplikacji w Pythonie: uruchamiać
-kontenery, zarządzać nimi, zarządzać Swarmami itp.
-
%prep
%setup -q -n %{pypi_name}-%{version}
%patch0 -p1
%build
-%if %{with python2}
%py_build
%if %{with tests}
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+PYTEST_PLUGINS="pytest_timeout" \
PYTHONPATH=$(pwd) \
-%{__python} -m pytest tests -W ignore
-%endif
-%endif
-
-%if %{with python3}
-%py3_build
-
-%if %{with tests}
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-%{__python} -m pytest tests
-%endif
+%{__python} -m pytest tests/unit -k 'not TCPSocketStreamTest'
%endif
%install
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
+
%py_install
-%py_postclean
-%endif
-%if %{with python3}
-%py3_install
-%endif
+%py_postclean
%clean
rm -rf $RPM_BUILD_ROOT
-%if %{with python2}
%files
%defattr(644,root,root,755)
%doc LICENSE README.md
%{py_sitescriptdir}/%{module}
%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%doc LICENSE README.md
-%{py3_sitescriptdir}/%{module}
-%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
-%endif
diff --git a/unpin-requirements.patch b/unpin-requirements.patch
index 738a85a..4800bbf 100644
--- a/unpin-requirements.patch
+++ b/unpin-requirements.patch
@@ -1,11 +1,11 @@
---- docker-4.2.1/requirements.txt.orig 2020-06-03 17:19:49.047177232 +0200
-+++ docker-4.2.1/requirements.txt 2020-06-03 17:21:15.051474069 +0200
-@@ -1,17 +1,17 @@
+--- docker-4.4.4/requirements.txt.orig 2023-10-30 22:13:39.841045573 +0100
++++ docker-4.4.4/requirements.txt 2023-10-30 22:15:12.930541264 +0100
+@@ -1,18 +1,5 @@
-appdirs==1.4.3
-asn1crypto==0.22.0
-backports.ssl-match-hostname==3.5.0.1
-cffi==1.14.4
--cryptography==3.4.7
+-cryptography==3.2
-enum34==1.1.6
-idna==2.5
-ipaddress==1.0.18
@@ -16,22 +16,11 @@
-pyparsing==2.2.0
-pywin32==227; sys_platform == 'win32'
-requests==2.20.0
+-six==1.10.0
-urllib3==1.24.3
-websocket-client==0.56.0
-+appdirs>=1.4.3
-+asn1crypto>=0.22.0
-+backports.ssl-match-hostname>=3.5.0.1
-+cffi>=1.14.4
-+cryptography>=3.4.7
-+enum34>=1.1.6
-+idna>=2.5
-+ipaddress>=1.0.18
-+packaging>=16.8
+paramiko>=2.4.2
-+pycparser>=2.17
-+pyOpenSSL>=18.0.0
-+pyparsing>=2.2.0
-+pywin32>=227; sys_platform == 'win32'
+requests>=2.20.0
++six>=1.10.0
+urllib3>=1.24.3
+websocket-client>=0.56.0
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-docker.git/commitdiff/7d5980d3732efda109958dbc18d5d638b52bbe65
More information about the pld-cvs-commit
mailing list