Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
build/bin/sage-pip-{install,uninstall}: Remove pip2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Sep 9, 2020
1 parent ca58693 commit 5a747c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions build/bin/sage-pip-install
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,9 @@ pip_install_flags="--ignore-installed --verbose --no-deps --no-index --isolated"
PYTHON=sage-python23

# The PIP variable is only used to determine the name of the lock file.
if [ "$SAGE_PYTHON3" = yes ]; then
PIP=pip3
else
PIP=pip2
fi
PIP=pip3

# We should avoid running pip2/3 while uninstalling a package because that
# We should avoid running pip while installing a package because that
# is prone to race conditions. Therefore, we use a lockfile while
# running pip. This is implemented in the Python script sage-flock
LOCK="$SAGE_LOCAL/var/lock/$PIP.lock"
Expand Down
8 changes: 2 additions & 6 deletions build/bin/sage-pip-uninstall
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ fi
PYTHON=sage-python23

# The PIP variable is only used to determine the name of the lock file.
if [ "$SAGE_PYTHON3" = yes ]; then
PIP=pip3
else
PIP=pip2
fi
PIP=pip3

# Find out the name of the package that we are installing
name="$($PYTHON setup.py --name)"
Expand All @@ -40,7 +36,7 @@ if [ $(echo "$name" | wc -l) -gt 1 ]; then
echo >&2 "line as the package name: $name"
fi

# We should avoid running pip2/3 while uninstalling a package because that
# We should avoid running pip while uninstalling a package because that
# is prone to race conditions. Therefore, we use a lockfile while
# running pip. This is implemented in the Python script sage-flock
LOCK="$SAGE_LOCAL/var/lock/$PIP.lock"
Expand Down

0 comments on commit 5a747c4

Please sign in to comment.