Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for pip 18 #908

Merged
merged 1 commit into from
Jul 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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