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

Commit

Permalink
build/pkgs/sagelib/spkg-install: Use helper function sdh_pip_editable…
Browse files Browse the repository at this point in the history
…_install
  • Loading branch information
Matthias Koeppe committed Nov 15, 2021
1 parent 3ef9c1d commit 50dd26c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion build/pkgs/sagelib/spkg-install
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
#!/usr/bin/env bash
# From sage-spkg.
# For type=script packages, the build rule in build/make/Makefile sources
# sage-env but not sage-dist-helpers.
lib="$SAGE_ROOT/build/bin/sage-dist-helpers"
source "$lib"
if [ $? -ne 0 ]; then
echo >&2 "Error: failed to source $lib"
echo >&2 "Is $SAGE_ROOT the correct SAGE_ROOT?"
exit 1
fi

if [ "$SAGE_EDITABLE" = yes ]; then
cd "$SAGE_SRC"
else
Expand Down Expand Up @@ -49,7 +60,7 @@ if [ "$SAGE_EDITABLE" = yes ]; then
# and renamed the distribution to "sagemath-standard"). There is no clean way to uninstall
# them, so we just use rm.
(cd "$SITEPACKAGESDIR" && rm -rf sage sage_setup sage-[1-9]*.egg-info sage-[1-9]*.dist-info)
time python3 -m pip install --verbose --no-deps --no-index --no-build-isolation --isolated --editable . || exit 1
time sdh_pip_editable_install .
else
# Likewise, we should remove the egg-link that may have been installed previously.
(cd "$SITEPACKAGESDIR" && rm -f sagemath-standard.egg-link)
Expand Down

0 comments on commit 50dd26c

Please sign in to comment.