#5155: Fix doctests and methods that want write access to $SAGE_LOCAL
------------------------+---------------------------------------------------
   Reporter:  mabshoff  |          Owner:  mabshoff   
       Type:  defect    |         Status:  needs_work 
   Priority:  critical  |      Milestone:  sage-4.7.2 
  Component:  doctest   |       Keywords:             
Work_issues:            |       Upstream:  N/A        
   Reviewer:            |         Author:  Mike Hansen
     Merged:            |   Dependencies:             
------------------------+---------------------------------------------------

Comment(by jhpalmieri):

 With Sage 4.7.2.alpha2, I see problems with qepcad and sympow.  I think
 the qepcad problem should be easy to solve, basically as mhansen did
 before:
 {{{
 #!diff
 diff --git a/sage/interfaces/qepcad.py b/sage/interfaces/qepcad.py
 --- a/sage/interfaces/qepcad.py
 +++ b/sage/interfaces/qepcad.py
 @@ -636,14 +636,14 @@ def _rewrite_qepcadrc():
      EXAMPLES:
          sage: from sage.interfaces.qepcad import _rewrite_qepcadrc
          sage: _rewrite_qepcadrc()
 -        sage: from sage.misc.misc import SAGE_LOCAL
 -        sage: open('%s/default.qepcadrc'%SAGE_LOCAL).readlines()[-1]
 +        sage: from sage.misc.misc import DOT_SAGE
 +        sage: open('%s/default.qepcadrc'%DOT_SAGE).readlines()[-1]
          'SINGULAR .../local//bin'
      """
      global _rewrote_qepcadrc
      if _rewrote_qepcadrc: return

 -    SL = sage.misc.misc.SAGE_LOCAL
 +    SL = sage.misc.misc.DOT_SAGE
      fn = '%s/default.qepcadrc'%SL
      text = \
  """# THIS FILE IS AUTOMATICALLY GENERATED -- DO NOT EDIT
 }}}
 Sympow will be harder to deal with, because of how the spkg is written: it
 tries to write files to SAGE_LOCAL/lib/sympow.  See
 [http://trac.sagemath.org/sage_trac/ticket/9703#comment:9] for a possible
 fix.

 I'm attaching a patch to try to deal with the situation when you run Sage
 for the very first time as a user without write permissions.

 Finally, there may be other issues if you compile Sage but don't run it,
 and then run doctests as a user without write permissions (the first time
 doctests get run, they might write some files which don't need to be
 written later).  These issues should be fixed, too.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5155#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to