Bug 1749881
| Summary: | Patch to work with Fedora sagemath package | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Paulo Andrade <paulo.cesar.pereira.de.andrade> | ||||
| Component: | cantor | Assignee: | Than Ngo <than> | ||||
| Status: | CLOSED UPSTREAM | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | rawhide | CC: | jreznik, kde-sig, rdieter, than | ||||
| Target Milestone: | --- | Keywords: | EasyFix, Patch | ||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2019-09-06 16:55:04 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
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] |
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.