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

Commit

Permalink
Small fix to sage-bootstrap-python
Browse files Browse the repository at this point in the history
The sage-bootstrap-python script doesn't work with pyenv.
For some reason the command "python" is treated differently
from python, leading to issues. My fix was to try removing
pyenv from the PATH before testing for python.
  • Loading branch information
k3w1k0d3r committed May 25, 2022
1 parent 6f4efb0 commit ab156dd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion build/bin/sage-bootstrap-python
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ if [ -z "$SAGE_ORIG_PATH" ]; then
# If not we're running from within sage-env just set the existing path
SAGE_ORIG_PATH="$PATH"
fi

paths=$(echo $SAGE_ORIG_PATH | tr ":" "\n")
NEW_PATH=""
for path in $paths
do
if [[ $path != *"pyenv"* ]]; then
NEW_PATH+="$path:"
fi
done
SAGE_ORIG_PATH=${NEW_PATH::-1}
# In particular, it is invoked by "bootstrap -d" for sage-download-file,
# i.e., before a configure run, and by "sage-spkg", also for sage-download-file.
# So it needs to find a python that has the urllib module.
Expand Down

0 comments on commit ab156dd

Please sign in to comment.