@@ -250,7 +250,7 @@ sage_setup() {
250
250
# if Python and sage-location haven't been installed yet.
251
251
maybe_sage_location ()
252
252
{
253
- if [ -w " $SAGE_LOCAL " ]; then
253
+ if [ -n " $SAGE_LOCAL " -a - w " $SAGE_LOCAL " ]; then
254
254
if [ -x " $SAGE_LOCAL /bin/python" ] && [ -x " $SAGE_LOCAL /bin/sage-location" ]; then
255
255
sage-location || exit $?
256
256
fi
520
520
# Run Sage's versions of Python, pip, IPython, Jupyter.
521
521
# ####################################################################
522
522
523
- if [ " $1 " = ' -pip' -o " $1 " = ' --pip' ]; then
523
+ if [ " $1 " = ' -pip' -o " $1 " = ' --pip' -o " $1 " = " --pip3 " ]; then
524
524
shift
525
- exec sage-python -m pip " $@ "
525
+ exec python3 -m pip " $@ "
526
526
fi
527
527
528
- if [ " $1 " = ' --pip3 ' ]; then
528
+ if [ " $1 " = ' -python ' -o " $1 " = ' --python ' -o " $1 " = ' -python3 ' -o " $1 " = ' --python3 ' ]; then
529
529
shift
530
- exec " $SAGE_LOCAL " /bin/ python3 -m pip " $@ "
530
+ exec python3 " $@ "
531
531
fi
532
532
533
- if [ " $1 " = ' -python ' -o " $1 " = ' --python ' ]; then
533
+ if [ " $1 " = ' -ipython ' -o " $1 " = ' --ipython ' -o " $1 " = ' -ipython3 ' -o " $1 " = ' --ipython3 ' ]; then
534
534
shift
535
- exec " $SAGE_LOCAL " /bin/python3 " $@ "
536
- fi
537
-
538
- if [ " $1 " = ' -python3' -o " $1 " = ' --python3' ]; then
539
- shift
540
- exec " $SAGE_LOCAL " /bin/python3 " $@ "
541
- fi
542
-
543
- if [ " $1 " = ' -ipython' -o " $1 " = ' --ipython' ]; then
544
- shift
545
- exec " $SAGE_LOCAL " /bin/ipython " $@ "
546
- fi
547
-
548
- if [ " $1 " = ' -ipython3' -o " $1 " = ' --ipython3' ]; then
549
- shift
550
- exec " $SAGE_LOCAL " /bin/ipython3 " $@ "
535
+ exec ipython3 " $@ "
551
536
fi
552
537
553
538
if [ " $1 " = ' -jupyter' -o " $1 " = ' --jupyter' ]; then
554
539
shift
555
- exec " $SAGE_LOCAL " /bin/ jupyter " $@ "
540
+ exec jupyter " $@ "
556
541
fi
557
542
558
543
# ####################################################################
@@ -976,7 +961,7 @@ install() {
976
961
done
977
962
# Display a message if we actually installed something (using this
978
963
# file, generated by sage-spkg, is a bit of a hack though)
979
- if [ -f " $SAGE_LOCAL /lib/sage-force-relocate.txt" ]; then
964
+ if [ -n " $SAGE_LOCAL " -a - f " $SAGE_LOCAL /lib/sage-force-relocate.txt" ]; then
980
965
echo
981
966
echo " Warning: it might be needed to update the Sage library before"
982
967
echo " installed packages work: you should run 'make' from \$ SAGE_ROOT"
0 commit comments