Merge pull request #1399 from docker/1395-docker-py-conflict

Prevent issues when installing docker and docker-py in the same environment
This commit is contained in:
Joffrey F 2017-01-19 16:19:28 -08:00 committed by GitHub
commit bcb869b27f
1 changed files with 10 additions and 0 deletions

View File

@ -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)