#10094: cython and C++
-----------------------------------------------+----------------------------
Reporter: vbraun | Owner: tbd
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.6.1
Component: packages | Keywords:
Author: Volker Braun | Upstream: N/A
Reviewer: Robert Bradshaw, Jeroen Demeyer | Merged:
Work_issues: |
-----------------------------------------------+----------------------------
Changes (by jdemeyer):
* status: needs_review => needs_work
Old description:
> I still can't build C++ cython modules, even though it should be possible
> with the cython-0.13.
> {{{
> python `which cython` --embed-positions --directive
> cdivision=True,autotestdict=False -I/home/vbraun/opt/sage-4.5.3/devel
> /sage-main -o sage/geometry/ppl.cpp sage/geometry/ppl.pyx
>
> Error converting Pyrex file to C:
> ------------------------------------------------------------
> ...
> """
>
> cdef Variable *thisptr
>
> def __cinit__(self, dimension_type i):
> thisptr = new Variable(i)
> ^
> ------------------------------------------------------------
>
> /home/vbraun/opt/sage-4.5.3/devel/sage-main/sage/geometry/ppl.pyx:19:22:
> Operation only allowed in c++
> }}}
> The problem seems to be that cython expects `--cplus` to enable the new
> language features. Cython does not derive this from the output file name
> extension ('cpp').
>
> I've written the obvious patch to `setup.py`, see attachment.
New description:
I still can't build C++ cython modules, even though it should be possible
with the cython-0.13.
{{{
python `which cython` --embed-positions --directive
cdivision=True,autotestdict=False -I/home/vbraun/opt/sage-4.5.3/devel
/sage-main -o sage/geometry/ppl.cpp sage/geometry/ppl.pyx
Error converting Pyrex file to C:
------------------------------------------------------------
...
"""
cdef Variable *thisptr
def __cinit__(self, dimension_type i):
thisptr = new Variable(i)
^
------------------------------------------------------------
/home/vbraun/opt/sage-4.5.3/devel/sage-main/sage/geometry/ppl.pyx:19:22:
Operation only allowed in c++
}}}
The problem seems to be that cython expects `--cplus` to enable the new
language features. Cython does not derive this from the output file name
extension ('cpp').
I've written the obvious patch to `setup.py`, see attachment.
Apply [attachment:trac_10094_add_cplus_command_line_option.patch] and
[attachment:10094_fix_doctests.2.patch].
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10094#comment:17>
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.