sagemath/sagemath-qepcad.patch

53 lines
1.7 KiB
Diff

diff -up src/sage/interfaces/qepcad.py.orig src/sage/interfaces/qepcad.py
--- src/sage/interfaces/qepcad.py.orig 2015-07-19 15:07:33.423329719 -0300
+++ src/sage/interfaces/qepcad.py 2015-07-19 15:07:50.294330365 -0300
@@ -522,8 +522,8 @@ TESTS:
Check the qepcad configuration file::
- sage: open('%s/default.qepcadrc'%SAGE_LOCAL).readlines()[-1]
- 'SINGULAR .../local/bin\n'
+ sage: open('/usr/share/qepcad/default.qepcadrc').readlines()[-1]
+ 'SINGULAR /usr/bin\n'
AUTHORS:
@@ -550,6 +550,8 @@ from sage.repl.preparse import implicit_
from expect import Expect, ExpectFunction, AsciiArtString
+QEPCAD_LOCAL = "/usr/share/qepcad"
+
def _qepcad_cmd(memcells=None):
r"""
Construct a QEPCAD command line.
@@ -560,17 +562,17 @@ def _qepcad_cmd(memcells=None):
sage: from sage.interfaces.qepcad import _qepcad_cmd
sage: s = _qepcad_cmd()
- sage: s == 'env qe=%s qepcad '%SAGE_LOCAL
+ sage: s == 'env qe=/usr/share/qepcad qepcad '
True
sage: s = _qepcad_cmd(memcells=8000000)
- sage: s == 'env qe=%s qepcad +N8000000'%SAGE_LOCAL
+ sage: s == 'env qe=/usr/share/qepcad qepcad +N8000000'
True
"""
if memcells is not None:
memcells_arg = '+N%s' % memcells
else:
memcells_arg = ''
- return "env qe=%s qepcad %s"%(SAGE_LOCAL, memcells_arg)
+ return "env qe=%s qepcad %s"%(QEPCAD_LOCAL, memcells_arg)
_command_info_cache = None
@@ -595,7 +597,7 @@ def _update_command_info():
cache = {}
- with open('%s/bin/qepcad.help'%SAGE_LOCAL) as help:
+ with open('%s/bin/qepcad.help'%QEPCAD_LOCAL) as help:
assert(help.readline().strip() == '@')
while True: