Skip to content

Commit

Permalink
Make sure we are using an old version of pip on our dev machines.
Browse files Browse the repository at this point in the history
Summary:
pip20+ stopped supporting python2.7.  We need to make sure we are
using an older pip.

Issue: https://khanacademy.slack.com/archives/C8Y4Q1E0J/p1613103475175600

Test Plan:
I ran
   if ! pip --version | grep -q "pip 1[0-9]"; then pip install -U "pip<20" setuptools; fi
manually in my shell twice.  The first time it successfully installed
something, the second time was a noop.

Reviewers: #devops, davidbraley

Reviewed By: #devops, davidbraley

Differential Revision: https://phabricator.khanacademy.org/D69259
  • Loading branch information
csilvers committed Feb 12, 2021
1 parent 51ef5ee commit d78a225
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions shared-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,12 @@ create_and_activate_virtualenv() {

# Activate the virtualenv.
. "$1/bin/activate"

# pip20+ stopped supporting python2.7, so we need to make sure
# we are using an older pip.
if ! pip --version | grep -q "pip 1[0-9]"; then
pip install -U "pip<20" setuptools
fi
}

# If we exit unexpectedly, log this warning.
Expand Down

0 comments on commit d78a225

Please sign in to comment.