On Wednesday, May 30, 2018 at 1:28:25 AM UTC-7, Jeroen Demeyer wrote: > > On 2018-05-29 22:57, Nils Bruin wrote: > > it would also be useful to > > use a "sage" executable that can figure out $SAGE_ROOT from scratch. > > Can you say more precisely what you mean with this? >
Currently, if I run the script $SAGE_LOCAL/bin/sage in my normal environment (where SAGE_ROOT is not set) then I get: Error: You must set the SAGE_ROOT environment variable or run this script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory. Error setting environment variables by sourcing '/usr/local/sage/sage-git/local/bin/sage-env'; possibly contact sage-devel (see http://groups.google.com/group/sage-devel). If instead I run the script $SAGE_ROOT/sage a value for SAGE_ROOT is figured out and everything works fine when called from my normal environment. If I change sage's kernel_spec to run the latter, I can use the whole SAGE_LOCAL/share/jupyter/kernels/sagemath jupyter kernel description directly with /usr/bin/jupyter (via a symlink or so). I think that's an advantage. If it were up to me, I would probably inject the logic of SAGE_ROOT/sage into SAGE_LOCAL/bin/sage because for me that would work fine. Linking to SAGE_LOCAL/share/jupyter/kernels/sagemath has the advantage that upgrades are automatically picked up when I use /usr/bin/jupyter. I can of course copy & edit files, but then they are not kept up-to-date. Similarly, I could edit the file in-place (e.g., equip the script with a hard-coded value for SAGE_ROOT), but then I have to deal with a source tree that is forever patched wrt. vanilla. -- 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+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.