#11680: support extra_compile_args (e.g., C99) when loading/attaching .pyx 
(cython)
files, and when using %cython in the notebook
--------------------------------+-------------------------------------------
    Reporter:  was              |         Owner:  jason                        
        Type:  enhancement      |        Status:  closed                       
    Priority:  minor            |     Milestone:  sage-4.7.2                   
   Component:  misc             |    Resolution:  fixed                        
    Keywords:  sd32             |   Work_issues:                               
    Upstream:  N/A              |      Reviewer:  William Stein, Leif Leonhardy
      Author:  Martin Albrecht  |        Merged:  sage-4.7.2.alpha3            
Dependencies:                   |  
--------------------------------+-------------------------------------------

Comment(by jhpalmieri):

 The patch here seems to be leaving some .c and .html files lying around
 during doctests.  I think we can fix this with this:
 {{{
 #!diff
 diff --git a/sage/misc/cython.py b/sage/misc/cython.py
 --- a/sage/misc/cython.py
 +++ b/sage/misc/cython.py
 @@ -17,7 +17,7 @@ AUTHORS:

  import os, sys, platform

 -from misc import SPYX_TMP, SAGE_ROOT, SAGE_LOCAL
 +from misc import SPYX_TMP, SAGE_ROOT, SAGE_LOCAL, SAGE_TMP
  from sage.misc.misc import UNAME

  def cblas():
 @@ -627,6 +627,7 @@ def compile_and_load(code):
      file = tmp_filename() + ".pyx"
      open(file,'w').write(code)
      from sage.server.support import cython_import
 +    os.chdir(SAGE_TMP)
      return cython_import(file)
 }}}
 Is this a good idea?  Can anyone confirm that the patch here is
 responsible for those files?  If so, we should open up a follow-up ticket.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11680#comment:23>
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