#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 leif):

 Replying to [comment:25 leif]:
 > Maybe we should also use `create_local_c_file=False`; I guess that also
 suppresses the HTML counterpart.

 FWIW, the following fixes the issue for me, '''without''' changing the
 current working directory:
 {{{
 #!diff
 diff --git a/sage/misc/cython.py b/sage/misc/cython.py
 --- a/sage/misc/cython.py
 +++ b/sage/misc/cython.py
 @@ -627,7 +627,8 @@
      file = tmp_filename() + ".pyx"
      open(file,'w').write(code)
      from sage.server.support import cython_import
 -    return cython_import(file)
 +    # return cython_import(file, create_local_c_file=False,
 annotate=False)
 +    return cython_import(file, create_local_c_file=False)


  TESTS = {
 }}}

 The line I've commented out does '''not''' work, since `cython_import()`
 doesn't propagate the `annotate` keyword to `sage.misc.cython.cython()`
 (i.e., it doesn't take such a keyword argument), which is perhaps a bug by
 itself.

 However, using just `create_local_c_file=False` is sufficient.

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