Installation manual: Update section "system-wide install"
mkoeppe opened this issue · 26 comments
(split out from #30207)
https://doc.sagemath.org/html/en/installation/source.html#installation-in-a-multiuser-environment should be updated:
- Don't edit the script
- Just symlink to the
sagescript in venv
We also add a link from the README to an optional step described only in the installation manual.
CC: @dimpase @jhpalmieri @slel
Component: documentation
Author: Matthias Koeppe
Branch/Commit: 7bc3394
Reviewer: John Palmieri
Issue created by migration from https://trac.sagemath.org/ticket/33787
Author: Matthias Koeppe
New commits:
60bcbec | README.md, src/doc/en/installation/source.rst: Update multi-user install |
Branch pushed to git repo; I updated commit sha1. New commits:
2116f9f | README.md: Update final step 'symlink sage', add jupyter kernel step |
Description changed:
---
+++
@@ -5,3 +5,4 @@
- Don't edit the script
- Just symlink to the `sage` script in venv
+We also add a link from the README to an optional step described only in the installation manual.The suggestion to use
$ sudo ln -s $(sage -sh -c 'ls $SAGE_ROOT/venv/bin/sage') /usr/local/binis not consistent with the top-level sage script, which has
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(a) Should the Sage script look in venv/bin rather than local/bin? (b) Should the suggestion be to make a symlink to SAGE_ROOT/src/bin/sage?
The local/bin/sage could be changed to venv/bin/sage, yes. But this distinction only matters when configure --prefix is not in use because --prefix implies --without-sage-venv. (In Volker's binary build, --prefix is used.)
The "elif" branch is only relevant in binary builds that don't ship src. Do Volker's binary builds (which we no longer advertise) have src?
Do Volker's binary builds (which we no longer advertise) have
src?
Actually, this turns out to be irrelevant - it looks like Volker stopped making these binaries altogether, the last one is 9.4 -http://files.sagemath.org/linux/64bit/index.html
But for the record, http://files.sagemath.org/linux/64bit/sage-9.4-Ubuntu_20.04-x86_64.tar.bz2 does have src, but it does not have the symbolic link venv (that was introduced in 9.5)
"stripped binary" might refer to what make micro_release creates. I have never used, but I think it is in use in the user-facing Docker containers somehow. It deletes a lot of stuff, but it does leave src/bin around.
So here's a simplification.
Replying to @jhpalmieri:
(b) Should the suggestion be to make a symlink to
SAGE_ROOT/src/bin/sage?
No. SAGE_ROOT/sage uses src/bin/sage to allow for uses in unconfigured source trees.
After a build of Sage, using the installed version is more canonical.
How can you run
sudo ln -s $(sage -sh -c 'ls $SAGE_ROOT/venv/bin/sage') /usr/local/bin
is sage isn't already in your path?
Thanks for catching this
Branch pushed to git repo; I updated commit sha1. New commits:
7bc3394 | README.md: Use ./sage in command line |
(I had copied this from similar invocations shown in src/doc/en/installation/launching.rst, which however start with "Assuming that SageMath can be invoked by typing sage"
Looks good to me.
Reviewer: John Palmieri
Thanks!
Changed branch from u/mkoeppe/installation_manual__update_section__system_wide_install_ to 7bc3394