Phil Austin wrote:
> I've got a non-standard python setup, with:
> 
> In [21]:numpy.get_include()
> Out[21]:'/users/user-soft/usr251_Centos/lib/python2.5/site-packages/numpy/core/include'
> 
> When I try to execute runtests.py it fails with:
> 
> numpy_test.c:107:31: error: numpy/arrayobject.h: No such file or directory
> 
> If I instead manually build tests/run/numpy_test.pyx
> using this setup.py everything works fine:
> 
> from distutils.core import setup
> from distutils.extension import Extension
> from Cython.Distutils import build_ext
> import numpy
> 
> setup(name        = 'numpy_test',
>        ext_modules = [Extension('numpy_test', ['numpy_test.pyx'],
>                                 include_dirs = [numpy.get_include(),'.'],
>                                 extra_compile_args=['-O3'])],
>        cmdclass    = {'build_ext': build_ext},
>        )
> 
> so it looks like a numpy.get_include() is needed somewhere in the
> unittest?

I think you just need to do

export 
INCLUDE=/users/user-soft/usr251_Centos/lib/python2.5/site-packages/numpy/core/include

prior to running the tests.

We try not to code any NumPy-specific stuff into the framework so I 
don't think this is likely to change, "explicit is better than implicit" 
and calling numpy.get_include in our test code seems to magic for me 
(but I don't have a strong opinion about it so if anyone else would like 
to add it I'm fine with it).

Hope that helps! (Let us know if not, you could also try

export CFLAGS=-I/users/...

)

-- 
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to