On Feb 13, 12:42 pm, MartinX <[email protected]> wrote:
> Trying to get to grips with MPComplex in cython with no success. I get
> a compile error on trying cimport.  This simple script in the
> notebook:

To answer my own question, it won't using %cython in the notebook, or
using sage.misc.cython, which is what the notebook calls. It can be
done by adding a module to sage; but this requires changes to sage
scripts.

The cython compiler extends distutils.build_ext and
distutils.extension to  pre-process the .pyx file and build the c
file.  The .pxd search path is specified in a separate argument
("pyrex_include_dirs") in the sub-classed Extension class.   The
setup.py script for a .pyx is therefore materially different from the
one used in %cython.

With the right setup.py script in place I have successfully compiled
my test prog. I will probably modify sage.misc.cython.py to do the job
for me.

Martin

-- 
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-support
URL: http://www.sagemath.org

Reply via email to