Skip to content

Commit

Permalink
Compat with pip10+
Browse files Browse the repository at this point in the history
This fixes docker#2001
  • Loading branch information
kiorky committed Apr 23, 2018
1 parent 1d6f8ec commit ab221c9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@
import os
import sys

import pip

try:
from pip import get_installed_distributions
except ImportError:
from pip._internal import get_installed_distributions

from setuptools import setup, find_packages

try:
if 'docker-py' in [
x.project_name for x in pip.get_installed_distributions()]:
x.project_name for x in get_installed_distributions()]:
print(
'ERROR: "docker-py" needs to be uninstalled before installing this'
' package:\npip uninstall docker-py', file=sys.stderr
Expand Down

0 comments on commit ab221c9

Please sign in to comment.