summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoffrey F <f.joffrey@gmail.com>2017-01-19 16:19:28 -0800
committerGitHub <noreply@github.com>2017-01-19 16:19:28 -0800
commitbcb869b27fb29739fedf6f821891b4aedb7749fc (patch)
tree4d8b1e96bca7a6471b1fc65ae0c85672e50f448d
parentbb665257ed10239e9846c94151a154e044f22681 (diff)
parente9691db91bc1c25999185b055afa62c4a9ee3265 (diff)
downloaddocker-py-bcb869b27fb29739fedf6f821891b4aedb7749fc.tar.gz
Merge pull request #1399 from docker/1395-docker-py-conflict
Prevent issues when installing docker and docker-py in the same environment
-rw-r--r--setup.py10
1 files changed, 10 insertions, 0 deletions
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)