]> gitweb.michael.orlitzky.com - shell.d.git/commitdiff
sage.sh: move SAGE_SHARE here, and use an alias to launch sage
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 6 Feb 2026 17:16:40 +0000 (12:16 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 6 Feb 2026 17:16:40 +0000 (12:16 -0500)
This is a bit simpler than a wrapper script in ~/.local/bin.

sage.sh

diff --git a/sage.sh b/sage.sh
index c9a7edd08716d088fecf66b8e8fa346f693990b9..892434ad88065b605a6e3cd0b382fabfdb8311e6 100644 (file)
--- a/sage.sh
+++ b/sage.sh
@@ -2,12 +2,16 @@
 # sage settings
 #
 
-# This is the default, but let's make sure.
-export SAGE_INSTALL_GCC=no
-
 # This is trinary, ha ha!
 export SAGE_DEBUG=no
 
+# Needed to find the sage-on-gentoo database packages.
+export SAGE_SHARE="/usr/share/sage"
+
+# Launch the sage CLI. This is what the script generated by pip would
+# do if we used that. Use python -m sage.doctest for doctests.
+alias sage="python -m sage.cli"
+
 # A "meson setup" command that disables all of the optional features,
 # including the documentation, and sets up a prefix-based install that
 # won't use any vendored dependencies. Does not include the trailing