Skip to content

Commit

Permalink
Merge pull request #908 from stealthycoin/add-pip-18-support
Browse files Browse the repository at this point in the history
Add support for pip 18
  • Loading branch information
stealthycoin authored Jul 23, 2018
2 parents e6ba7fc + 49673a3 commit 3bfbd3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions chalice/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ def pip_import_string():
# type: () -> str
import pip
pip_major_version = pip.__version__.split('.')[0]
if pip_major_version == '10':
return 'from pip._internal import main'
else:
# Pip moved its internals to an _internal module in version 10.
# In order to be compatible with version 9 which has it at at the
# top level we need to figure out the correct import path here.
if pip_major_version == '9':
return 'from pip import main'
else:
return 'from pip._internal import main'


if os.name == 'nt':
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
'botocore>=1.10.48,<2.0.0',
'typing==3.6.4',
'six>=1.10.0,<2.0.0',
'pip>=9,<11',
'pip>=9,<=18',
'attrs==17.4.0',
'enum-compat>=0.0.2',
'jmespath>=0.9.3,<1.0.0',
Expand Down

0 comments on commit 3bfbd3d

Please sign in to comment.