#10249 closed enhancement (invalid)
(invalid -- do not use) c++ and %cython in the notebook
Reported by: | was | Owned by: | jason |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | misc | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Make it so that the "#clang c++" pragma in %cython blocks in the notebook correctly invokes the --cplus option to the Cython compiler.
This is related to trac #10094.
Attachments (1)
Change History (5)
Changed 12 years ago by
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
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.
comment:3 Changed 12 years ago by
- Resolution set to invalid
- Status changed from new to closed
- Summary changed from c++ and %cython in the notebook to (invalid -- do not use) c++ and %cython in the notebook
This is no longer needed in sage-4.6, and in fact breaks things! So marked as in valid -- do not apply.
comment:4 Changed 12 years ago by
- Milestone changed from sage-4.6.1 to sage-duplicate/invalid/wontfix
Note: See
TracTickets for help on using
tickets.
You could test this by pasting the following into a notebook cell:
Then making another notebook cell and pasting the following in:
Then in a third cell do:
OK, not exactly a minimal example :-)