diff --git a/.gitignore b/.gitignore index da1f2de..2049e2d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/54a154d8b251df5e4788570dac4bea3cfa70b199.tar.gz +SOURCES/docker-py-cc399d22b4f0631e5901019b005aa5109dc635a0.tar.gz diff --git a/.python-docker-py.metadata b/.python-docker-py.metadata index 60c94a0..d994d3c 100644 --- a/.python-docker-py.metadata +++ b/.python-docker-py.metadata @@ -1 +1 @@ -1a00c6b67a8b874cdbfc5d5a73c9d8775bb2f332 SOURCES/54a154d8b251df5e4788570dac4bea3cfa70b199.tar.gz +667e311aedab3346d924429382998c524ad01a3b SOURCES/docker-py-cc399d22b4f0631e5901019b005aa5109dc635a0.tar.gz diff --git a/SOURCES/remote-inspection.patch b/SOURCES/remote-inspection.patch new file mode 100644 index 0000000..4db85b4 --- /dev/null +++ b/SOURCES/remote-inspection.patch @@ -0,0 +1,49 @@ +From 0b66aa1d60aa05518b69dbb0b96387b504ec79e7 Mon Sep 17 00:00:00 2001 +From: Dan Walsh +Date: Thu, 7 Jan 2016 13:11:32 -0500 +Subject: [PATCH] Remote inspect binding. + +Signed-off-by: William Temple +--- + docker/api/image.py | 9 +++++++-- + tests/unit/image_test.py | 3 ++- + 2 files changed, 9 insertions(+), 3 deletions(-) + +diff --git a/docker/api/image.py b/docker/api/image.py +index 8493b38..7de76e1 100644 +--- a/docker/api/image.py ++++ b/docker/api/image.py +@@ -138,9 +138,14 @@ class ImageApiMixin(object): + return self._result(self._post(api_url, params=params)) + + @utils.check_resource +- def inspect_image(self, image): ++ def inspect_image(self, image, remote=False): ++ params = {} ++ if remote: ++ params['remote'] = 1 + return self._result( +- self._get(self._url("/images/{0}/json", image)), True ++ self._get(self._url("/images/{0}/json".format(image)), ++ params=params), ++ True + ) + + def load_image(self, data): +diff --git a/tests/unit/image_test.py b/tests/unit/image_test.py +index a46e48e..00256d2 100644 +--- a/tests/unit/image_test.py ++++ b/tests/unit/image_test.py +@@ -193,7 +193,8 @@ class ImageTest(DockerClientTest): + fake_request.assert_called_with( + 'GET', + url_prefix + 'images/test_image/json', +- timeout=DEFAULT_TIMEOUT_SECONDS ++ timeout=DEFAULT_TIMEOUT_SECONDS, ++ params={} + ) + + def test_inspect_image_undefined_id(self): +-- +2.6.4 + diff --git a/SPECS/python-docker-py.spec b/SPECS/python-docker-py.spec index 6e9cb61..214250f 100644 --- a/SPECS/python-docker-py.spec +++ b/SPECS/python-docker-py.spec @@ -1,25 +1,31 @@ %if 0%{?fedora} -%global with_python3 1 +%global with_python3 0 %endif #fedora # disable debug package cause archful -%global debug_package %{nil} -%global commit 54a154d8b251df5e4788570dac4bea3cfa70b199 +%global debug_package %{nil} + +%global owner docker +%global project docker-py +%global commit cc399d22b4f0631e5901019b005aa5109dc635a0 %global shortcommit %(c=%{commit}; echo ${c:0:7}) -Name: python-docker-py -Version: 1.4.0 -Release: 118%{?dist} +Name: python-%{project} +Version: 1.7.2 +Release: 1%{?dist} Summary: An API client for docker written in Python License: ASL 2.0 -URL: https://github.com/docker/docker-py -Source0: https://github.com/rhatdan/docker-py/archive/%{commit}.tar.gz +URL: https://github.com/%{owner}/%{project}/ +Source0: https://github.com/%{owner}/%{project}/archive/%{commit}/%{project}-%{commit}.tar.gz +Patch1: remote-inspection.patch + BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools -BuildRequires: python-tools -BuildRequires: python-websocket-client >= 0.11.0 -BuildRequires: python-coverage + +Requires: python-requests +Requires: python-websocket-client >= 0.32.0 +Requires: python-six >= 1.4.0 %if 0%{?with_python3} BuildRequires: python3-devel @@ -30,16 +36,6 @@ BuildRequires: python3-websocket-client >= 0.11.0 BuildRequires: python3-coverage >= 3.7.1 %endif # with_python3 -%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 Obsoletes: docker-python <= 1.4.0-115.x86_64 Provides: docker-python == %{version}-%{release} @@ -58,7 +54,8 @@ A Python 3 interface to Docker %endif # with_python3 %prep -%setup -q -n docker-py-%{commit} +%setup -q -n %{project}-%{commit} +%patch1 -p 1 %if 0%{?with_python3} rm -rf %{py3dir} @@ -87,7 +84,9 @@ popd %endif # with_python3 %check -[ ! -w /run/docker.sock ] || make test +# we need pytest and a bunch of packages which are not available in RHEL +# PYTHONPATH="${PWD}" py.test-%%{python2_version} tests/unit/ + %files %doc LICENSE README.md @@ -104,6 +103,12 @@ popd %endif # with_python3 %changelog +* Fri Mar 04 2016 Tomas Tomecek - 1.7.2-1 +- new upstream release: 1.7.2 + +* Wed Jan 13 2016 Tomas Tomecek - 1.6.0-1 +- update to 1.6.0 + * Wed Nov 04 2015 Lokesh Mandvekar - 1.4.0-118 - Resolves: rhbz#1254579 - previous docker-python was archful