Skip to content

Commit f981b15

Browse files
author
Matthias Koeppe
committed
Fix installation of pip with SAGE_SUDO
1 parent 1f0bc9d commit f981b15

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

build/bin/sage-dist-helpers

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ sdh_store_and_pip_install_wheel() {
388388
local sudo=""
389389
local root=""
390390
fi
391-
sdh_actually_pip_install_wheel $distname $root $pip_options -r "$SAGE_SPKG_SCRIPTS/$PKG_BASE/spkg-requirements.txt"
391+
sdh_actually_pip_install_wheel $distname $root $pip_options "$wheel"
392392
fi
393393
echo "sdh_pip_uninstall -r \"\$SAGE_SPKG_SCRIPTS/\$PKG_BASE/spkg-requirements.txt\"" >> "$script_dir"/spkg-piprm
394394
}
@@ -406,7 +406,7 @@ sdh_actually_pip_install_wheel() {
406406
echo "(ignoring error)" >&2
407407
fi
408408
$sudo sage-pip-install "$@" || \
409-
sdh_die "Error installing $@"
409+
sdh_die "Error installing $distname"
410410
}
411411

412412
sdh_pip_uninstall() {

build/pkgs/pip/spkg-install.in

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ cd src
22

33
sdh_setup_bdist_wheel
44

5+
# pip can install its own wheel! But first we need to ensure that the pip
6+
# source directory in on the PYTHONPATH
7+
export PYTHONPATH="$(pwd)/src"
8+
59
# --ignore-installed makes sure that pip does not mistake
610
# its own source tree as an existing installation
711
sdh_store_and_pip_install_wheel --ignore-installed .

0 commit comments

Comments
 (0)