1 From 978643b7222db66837d39037f884be01fb9af234 Mon Sep 17 00:00:00 2001
2 From: Peter Korsgaard <peter@korsgaard.com>
3 Date: Fri, 9 Mar 2018 18:40:16 +0100
4 Subject: [PATCH] setup.py: make pip optional
6 pip may not be available on the build host, and it is only used to check if
7 docker-py is already installed, so skip the check if pip isn't available.
9 [Upstream-status: submitted (https://github.com/docker/docker-py/pull/1948)]
10 Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
12 setup.py | 20 ++++++++++++--------
13 1 file changed, 12 insertions(+), 8 deletions(-)
15 diff --git a/setup.py b/setup.py
16 index 271d94f..c9b91a3 100644
19 @@ -5,16 +5,20 @@ import codecs
25 from setuptools import setup, find_packages
27 -if 'docker-py' in [x.project_name for x in pip.get_installed_distributions()]:
29 - 'ERROR: "docker-py" needs to be uninstalled before installing this'
30 - ' package:\npip uninstall docker-py', file=sys.stderr
37 + [x.project_name for x in pip.get_installed_distributions()]:
39 + 'ERROR: "docker-py" needs to be uninstalled before installing this'
40 + ' package:\npip uninstall docker-py', file=sys.stderr
46 ROOT_DIR = os.path.dirname(__file__)
47 SOURCE_DIR = os.path.join(ROOT_DIR)