Skip to content

Commit

Permalink
Trac #26008: Upgrade setuptools and pip
Browse files Browse the repository at this point in the history
'''Tarballs''':

- https://files.pythonhosted.org/packages/d3/3e/1d74cdcb393b68ab9ee18d78
c11ae6df8447099f55fe86ee842f9c5b166c/setuptools-40.0.0.zip

- https://files.pythonhosted.org/packages/69/81/52b68d0a4de760a2f1979b09
31ba7889202f302072cc7a0d614211bc7579/pip-18.0.tar.gz

URL: https://trac.sagemath.org/26008
Reported by: jdemeyer
Ticket author(s): Jeroen Demeyer
Reviewer(s): Julian Rüth
  • Loading branch information
Release Manager authored and vbraun committed Aug 10, 2018
2 parents eeb4a21 + 8602213 commit e674750
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 21 deletions.
22 changes: 12 additions & 10 deletions build/bin/sage-pip-install
Expand Up @@ -17,7 +17,10 @@
# This also disables pip's version self-check.
# --isolated : Don't read configuration files such as
# ~/.pydistutils.cfg
pip_install_flags="--ignore-installed --verbose --no-deps --no-index --isolated"
# --no-build-isolation:Build the package in the usual Python environment
# (containing the dependencies) instead of an
# "isolated" environment
pip_install_flags="--ignore-installed --verbose --no-deps --no-index --isolated --no-build-isolation"

# Consume any additional pip install arguments except the last one
while [ $# -gt 1 ]; do
Expand Down Expand Up @@ -66,19 +69,18 @@ LOCK="$SAGE_LOCAL/var/lock/$PIP.lock"
while true; do
out=$(sage-flock -x $LOCK $PIP uninstall --disable-pip-version-check -y "$name" 2>&1)
if [ $? -ne 0 ]; then
# Uninstall failed
echo >&2 "$out"
exit 1
fi

# Uninstall succeeded, which may mean that the package was not
# installed to begin with.
if [[ "$out" != *"not installed" ]]; then
break
fi
echo "$out"
done

# Not ideal, but this is the easiest way to check if the package
# was not installed to begin with (which pip2/3 treats as an error).
# If it wasn't, then we proceed quietly; if it was installed show the
# uninstallation output and error out.
if [[ "$out" != *"not installed" ]]; then
echo >&2 "$out"
exit 1
fi

# Finally actually do the installation (the "SHARED" tells pip2/3-lock
# to apply a shared lock)
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/pip/checksums.ini
@@ -1,4 +1,4 @@
tarball=pip-VERSION.tar.gz
sha1=1f5f44d433ca599d40f8e46f440479b2c73802d8
md5=b15b33f9aad61f88d0f8c866d16c55d8
cksum=3941571893
sha1=337f4694bfcd4d698d9b02b38a7520fabc42a1d9
md5=52f75ceb21e96c258f289859a2996b60
cksum=3433326775
2 changes: 1 addition & 1 deletion build/pkgs/pip/package-version.txt
@@ -1 +1 @@
9.0.3
18.0
9 changes: 6 additions & 3 deletions build/pkgs/pip/spkg-install
@@ -1,13 +1,16 @@
cd src

# pip can install itself!
#

# pip can install itself! But first we need to ensure that the pip
# source directory in on the PYTHONPATH
export PYTHONPATH=`cd src && pwd`

# need to use --upgrade or --ignore-installed; Otherwise pip, which is
# importing itself, will think itself is already installed
#
# Install pip3 first so pip2 overwrites local/bin/pip
for vers in 3 2; do
python${vers} -m pip install --verbose --no-index --ignore-installed \
--isolated --root="$SAGE_DESTDIR" . || \
--no-build-isolation --isolated --root="$SAGE_DESTDIR" . || \
sdh_die "Error building / installing pip${vers}"
done
6 changes: 3 additions & 3 deletions build/pkgs/setuptools/checksums.ini
@@ -1,4 +1,4 @@
tarball=setuptools-VERSION.zip
sha1=37328c5a707856eb0fb086da6cf60ceb85a493c2
md5=e8e05d4f8162c9341e1089c80f742f64
cksum=1301272111
sha1=dac21f957c047b1b222a54fd2b2a3053c59cbfce
md5=260630ae1a64bafa39dcc53404d63829
cksum=2213770058
2 changes: 1 addition & 1 deletion build/pkgs/setuptools/package-version.txt
@@ -1 +1 @@
38.2.4.p0
40.0.0

0 comments on commit e674750

Please sign in to comment.