diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers index c2355a2afbb..b159d696745 100644 --- a/build/bin/sage-dist-helpers +++ b/build/bin/sage-dist-helpers @@ -388,7 +388,7 @@ sdh_store_and_pip_install_wheel() { local sudo="" local root="" fi - sdh_actually_pip_install_wheel $distname $root $pip_options -r "$SAGE_SPKG_SCRIPTS/$PKG_BASE/spkg-requirements.txt" + sdh_actually_pip_install_wheel $distname $root $pip_options "$wheel" fi echo "sdh_pip_uninstall -r \"\$SAGE_SPKG_SCRIPTS/\$PKG_BASE/spkg-requirements.txt\"" >> "$script_dir"/spkg-piprm } @@ -406,7 +406,7 @@ sdh_actually_pip_install_wheel() { echo "(ignoring error)" >&2 fi $sudo sage-pip-install "$@" || \ - sdh_die "Error installing $@" + sdh_die "Error installing $distname" } sdh_pip_uninstall() { diff --git a/build/pkgs/pip/spkg-install.in b/build/pkgs/pip/spkg-install.in index 6712a1583bc..651f5c1dc1e 100644 --- a/build/pkgs/pip/spkg-install.in +++ b/build/pkgs/pip/spkg-install.in @@ -2,6 +2,10 @@ cd src sdh_setup_bdist_wheel +# pip can install its own wheel! But first we need to ensure that the pip +# source directory in on the PYTHONPATH +export PYTHONPATH="$(pwd)/src" + # --ignore-installed makes sure that pip does not mistake # its own source tree as an existing installation sdh_store_and_pip_install_wheel --ignore-installed .