Created attachment 1612463 [details] cantor-sagemath-python3.patch The attached patch works with both the upstream sagemath that uses python2, and with the Fedora rpm package that uses python3. A minor extra patch will be added in the sagemath package for full functionality. Please also consider adding the patch to the supported Fedora releases.
Wouldn't this be more useful submitted to cantor upstream? (then everyone would benefit, not just fedora). Futher, it's not clear why this patch is needed, can you provide some sort of justification/reason?
The patch can be simplified a bit, can just write: print('____TMP_DIR____', sage.misc.misc.SAGE_TMP) instead of print(\"%s %s\" % ('____TMP_DIR____', sage.misc.misc.SAGE_TMP)) The problem is that with python3 syntax: $ python3 -c 'print 1, 2' File "<string>", line 1 print 1, 2 ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(1, 2)? $ python3 -c 'print(1, 2)' 1 2 Currently I believe only Fedora is building a sagemath package with python3. I will report the problem upstream. Another cool feature could be to add an entry to use local documentation, instead of from www.sagemath.org. Will include the request on the upstream bug report.
Main issue reported at: https://bugs.kde.org/show_bug.cgi?id=411645 [Make sagemath backend compatible with sagemath built with python3] Second issue reported at: https://bugs.kde.org/show_bug.cgi?id=411646 [Please consider adding a configuration to use local sagemath documentation]