Run the actual Sage script

69 views
Skip to first unread message

ph h

unread,
May 16, 2022, 4:35:37 AM5/16/22
to sage-devel
Dear All,

Please find appended below a snippet from  $SAGE_ROOT/sage.

Would it be nice if "$SAGE_LOCAL/sage" could be used without assumptions instead of "$SAGE_ROOT/local/bin/sage" with the assumption that 'SAGE_LOCAL is the "local" subdirectory'

BTW, should "$SAGE_LOCAL/sage"  be the first choice if it is ready to run?

Thank you for your enlightenment

Regards,

phiho

<$SAGE_ROOT/sage>
# Run the actual Sage script
if [ -x "$SAGE_ROOT/src/bin/sage" ]; then
    exec "$SAGE_ROOT/src/bin/sage" "$@"
elif [ -x "$SAGE_ROOT/local/bin/sage" ]; then # if in a stripped binary
    # Note in this case we assume that SAGE_LOCAL is the "local" subdirectory
    exec "$SAGE_ROOT/local/bin/sage" "$@"
else
    echo >&2 "$0: no Sage installation found in \$SAGE_ROOT=$SAGE_ROOT"
    exit 1
fi
</$SAGE_ROOT/sage>

ph h

unread,
May 16, 2022, 5:33:03 AM5/16/22
to sage-...@googlegroups.com
P.S: Sorry, there was a typo,  "$SAGE_LOCAL/sage" should read  "$SAGE_LOCAL/bin/sage"

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/8a705a39-977c-4fcb-b1f4-5d38b490f3e1n%40googlegroups.com.

Matthias Koeppe

unread,
May 16, 2022, 12:23:58 PM5/16/22
to sage-devel
On Monday, May 16, 2022 at 1:35:37 AM UTC-7 hohoa...@gmail.com wrote:
[...]  $SAGE_ROOT/sage [...]

The positively reviewed tickets https://trac.sagemath.org/ticket/33786 and https://trac.sagemath.org/ticket/33787 make changes to this script. You may find these changes and the discussion on the ticket interesting.

https://trac.sagemath.org/ticket/33852 makes other changes related to the script. It needs review.

ph h

unread,
May 16, 2022, 1:32:03 PM5/16/22
to sage-...@googlegroups.com
Hi,

"""
We change the bootstrap scripts so that they invoke build/bin/sage-package directly instead of going through the SAGE_ROOT/sage script.
"""

This is great news, a big time saver. Thank you so much.
Until then,  this hitchhiker needs to restore the original '$SAGE_ROOT/sage' before she can 'make configure' ('bootstrap' requires that original 'sage') while testing 'configure.ac'

Best regards,

phiho


--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.

ph h

unread,
May 26, 2022, 1:13:38 AM5/26/22
to sage-...@googlegroups.com
Hi,

"""
We change the bootstrap scripts so that they invoke build/bin/sage-package directly instead of going through the SAGE_ROOT/sage script.
"""

It would be nice if usage_advanced() and sage_version() could be factored out of src/bin/sage so that the src/doc/bootstrap can be completely independent of SAGE_ROOT/sage:

# ./sage -advanced    > "$OUTPUT"

SAGE_ROOT="$(pwd)"
. "src/bin/sage-version"
. "src/bin/sage-usage_advanced"  > "$OUTPUT"

Is there a better way to achieve this?

Thank you for your help.

Regards,

phiho

Message has been deleted

Matthias Koeppe

unread,
May 26, 2022, 2:46:46 PM5/26/22
to sage-devel
Well, https://trac.sagemath.org/ticket/33852 (needs review) removes this code from src/doc/bootstrap.

ph h

unread,
May 26, 2022, 7:00:47 PM5/26/22
to sage-...@googlegroups.com
Hi,

> Well, https://trac.sagemath.org/ticket/33852 (needs review) removes this code from src/doc/bootstrap.

Thank you so much. This is certainly a much better solution.
Hopefully, this trac will get positive reviews soon.

All the best.

phiho


Reply all
Reply to author
Forward
0 new messages