#10249: c++ and %cython in the notebook
---------------------------+------------------------------------------------
Reporter: was | Owner: jason
Type: enhancement | Status: new
Priority: major | Milestone: sage-4.6.1
Component: misc | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
---------------------------+------------------------------------------------
Comment(by vbraun):
Are there any prerequisite patches? On sage-4.6 with no other patches to
the notebook, I tried
{{{
%cython
#clang c++
cdef extern from "math.h":
double sin(double)
cpdef t():
return sin(1)
}}}
This works without the `#clang`, but in c++ mode the notebook gives me an
error
{{{
cp: cannot stat
`_home_vbraun__sage_sage_notebook_sagenb_home_admin_2_code_sage29_spyx_0.c':
No such file or directory
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "_sage_input_18.py", line 10, in <module>
exec
compile(u'_support_.cython_import_all("/home/vbraun/.sage/sage_notebook.sagenb/home/admin/2/code/sage29.spyx",
globals())
File "", line 1, in <module>
File "/home/vbraun/Sage/sage/devel/sagenb/sagenb/misc/support.py", line
519, in cython_import_all
create_local_c_file=create_local_c_file)
File "/home/vbraun/Sage/sage/devel/sagenb/sagenb/misc/support.py", line
496, in cython_import
create_local_c_file=create_local_c_file)
File "/home/vbraun/Sage/sage/local/lib/python2.6/site-
packages/sage/misc/cython.py", line 372, in cython
raise RuntimeError, "Error converting %s to C:\n%s\n%s"%(filename,
log, err)
RuntimeError: Error converting
/home/vbraun/.sage/sage_notebook.sagenb/home/admin/2/code/sage29.spyx to
C:
}}}
Cython created the source file
`_home_vbraun__sage_sage_notebook_sagenb_home_admin_2_code_sage29_spyx_0.cpp`,
so `cp` shouldn't try to copy the `.c` file.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10249#comment:2>
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.