cython --annotate with compile-time environment variable

100 views
Skip to first unread message

Pierre Augier

unread,
Mar 3, 2015, 4:51:48 AM3/3/15
to cython...@googlegroups.com
Hello,

I would like to do something that should be simple but that seems to be impossible with the last Cython release (I may be wrong).

I'd like to produce the annotated html file by the command line

cython -a example.pyx

But since the file uses one compile-time environment variable that is usually passed to Cython from the setup.py file (with cython_compile_time_env), Cython complains:

example.pyx:30:9: Compile-time name 'MPI4PY' not defined

So I should give as an argument the compile-time environment but it doesn't seem to be possible.

Since it should be quite easy to implement this feature, I tell you that it would be useful, at least for me.

Regards,
Pierre

Emmanuel Gil Peyrot

unread,
Mar 24, 2015, 4:26:54 AM3/24/15
to cython...@googlegroups.com
It is already implemented, in your setup.py, use a
cythonize(annotate=True, …) call, and it will generate the HTML files
alongside the C files.

>
> Regards,
> Pierre

--
Emmanuel Gil Peyrot
Reply all
Reply to author
Forward
0 new messages