From e9691db91bc1c25999185b055afa62c4a9ee3265 Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Wed, 18 Jan 2017 16:26:22 -0800 Subject: Prevent issues when installing docker and docker-py in the same environment Signed-off-by: Joffrey F --- setup.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'setup.py') diff --git a/setup.py b/setup.py index b82a74f..9fc4ad6 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,20 @@ #!/usr/bin/env python +from __future__ import print_function + import codecs import os import sys +import pip + from setuptools import setup, find_packages +if 'docker-py' in [x.project_name for x in pip.get_installed_distributions()]: + print( + 'ERROR: "docker-py" needs to be uninstalled before installing this' + ' package:\npip uninstall docker-py', file=sys.stderr + ) + sys.exit(1) ROOT_DIR = os.path.dirname(__file__) SOURCE_DIR = os.path.join(ROOT_DIR) -- cgit v1.2.1