Thanks! Adding those include statements was almost good enough. Cython also
needs an include directory, and knowing the files helped me find it, so to
annotate I can now use

sage -cython --annotate -I`sage -root`/devel/sage/sage/ext filename.pyx

and running cython without annotating works as well, of course. I haven't
actually tried to compile the resulting c code, because I don't care about
that right now, but getting it to work and making an importable module is
just a matter of finding the right compiler arguments.

On Mon, Mar 5, 2012 at 3:15 AM, Simon King <simon.k...@uni-jena.de> wrote:

> Hi Jonathan,
>
> On 5 Mrz., 08:00, Jonathan Bober <jwbo...@gmail.com> wrote:
> > In this case, what I really want to do right now
> > it look at annotated cython output to see if some things are compiling
> the
> > way that I think they should be compiling, but this is a slightly more
> > general question than that.
>
> If all what you want is to see an annotated cython output, and your
> file is not too long, then you can copy-and-paste it into a cell of
> the notebook, prepending it with %cython. After evaluating the cell,
> you should get two links. One provides the resulting C-code, the other
> provides the annotated cython code.
>
> In that way, you can also see that Sage would prepend your code from
> the notebook cell with the following:
>  include "interrupt.pxi"  # ctrl-c interrupt block support
>  include "stdsage.pxi"  # ctrl-c interrupt block support
>  include "cdefs.pxi"
>
> Perhaps these are the missing bits causing trouble for "sage -cython
> filename.pyx"?
>
> Cheers,
> Simon
>
> --
> To post to this group, send email to sage-support@googlegroups.com
> To unsubscribe from this group, send email to
> sage-support+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/sage-support
> URL: http://www.sagemath.org
>

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to