Skip to content

Commit 9c6d76f

Browse files
committed
Prevent issues when installing docker and docker-py in the same environment
Signed-off-by: Joffrey F <[email protected]>
1 parent 4699cfd commit 9c6d76f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

setup.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
11
#!/usr/bin/env python
2+
from __future__ import print_function
3+
24
import codecs
35
import os
46
import sys
57

8+
import pip
9+
610
from setuptools import setup, find_packages
711

12+
if 'docker-py' in [x.project_name for x in pip.get_installed_distributions()]:
13+
print(
14+
'ERROR: "docker-py" needs to be uninstalled before installing this'
15+
' package:\npip uninstall docker-py', file=sys.stderr
16+
)
17+
sys.exit(1)
818

919
ROOT_DIR = os.path.dirname(__file__)
1020
SOURCE_DIR = os.path.join(ROOT_DIR)

0 commit comments

Comments
 (0)