Fix sagemath backend when there is no sage-env
ClosedPublic

Authored by arojas on Oct 26 2019, 6:51 AM.

Details

Summary

Since sagemath 8.9 it is possible to run sage without sourcing sage-env (https://trac.sagemath.org/ticket/28225) so don't abort if it is not present.

Test Plan

sagemath backend works in Arch Linux (which doesn't ship sage-env)

Diff Detail

Repository
R55 Cantor
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
arojas created this revision.Oct 26 2019, 6:51 AM
Restricted Application added a project: KDE Edu. · View Herald TranscriptOct 26 2019, 6:51 AM
Restricted Application added a subscriber: kde-edu. · View Herald Transcript
arojas requested review of this revision.Oct 26 2019, 6:51 AM

But what about older versions? For example, user can use Cantor 19.12 with sage 8.1 (yes, retrograde, but this is possible). I think, we should add some checking and use something like

...
else version < 8.9
    exit 1

so, we won't miss situations, when we don't found sage-env for versions, where this is needed.

If there is no sage-env and Sage expects it then it will throw errors itself - I don't think it's Cantor's job to detect whether the Sage install is broken. Also note that some distros (eg. gentoo) have been patching sage to run without sage-env for a while, so a simple version check wouldn't be reliable.

sirgienko accepted this revision.Oct 26 2019, 4:39 PM

Well, I hope, that this is change won't bring us problems

This revision is now accepted and ready to land.Oct 26 2019, 4:39 PM
This revision was automatically updated to reflect the committed changes.