mirror of https://github.com/docker/docker-py.git
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:
commit
bcb869b27f
10
setup.py
10
setup.py
|
@ -1,10 +1,20 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
from __future__ import print_function
|
||||||
|
|
||||||
import codecs
|
import codecs
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
import pip
|
||||||
|
|
||||||
from setuptools import setup, find_packages
|
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__)
|
ROOT_DIR = os.path.dirname(__file__)
|
||||||
SOURCE_DIR = os.path.join(ROOT_DIR)
|
SOURCE_DIR = os.path.join(ROOT_DIR)
|
||||||
|
|
Loading…
Reference in New Issue