On 2 Feb., 21:26, Michael Yurko <myu...@gmail.com> wrote: > Hello All, > > I've recently been building an extension module using both cython and numpy. > It works fine with my system-wide install of python with numpy and cython as > well as my install of sage. However, when I try to run it from sage on a > system that doesn't have a system wide install of cython and numpy, it fails > with: > /home/myurko/.pyxbld/temp.linux-x86_64-2.6/pyrex/numpy_test.c:144:31: error: > numpy/arrayobject.h: No such file or > directory > /home/myurko/.pyxbld/temp.linux-x86_64-2.6/pyrex/numpy_test.c:145:31: error: > numpy/ufuncobject.h: No such file or directory > > and then pages of issues relating to the failure to include arrayobject.h > and ufuncobect.h . This issue is simply illustrated by the two short > files:http://modular.math.washington.edu/home/myurko/misc/npt_wrapper.pyandhttp://modular.math.washington.edu/home/myurko/misc/numpy_test.pyx. > Before > I open a ticket, I just wanted to make sure that there already isn't one > open, or there is not some other issue at play. > > Thanks, > Mike Yurko
Try adding the line (yes, it's a *comment*) #cinclude $SAGE_ROOT/local/lib/python/site-packages/numpy/core/include to your *.pyx file. I don't remember right now where this stuff (#cinclude, #clib, ...) for .pyx modules in conjunction with Sage is documented. But it's not a bug, it's a feature ... Cheers, Georg -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org