Hi, I have numpy installed system-wide, but I also have my own (svn) version in ~/.local. When I compile cython modules which make use of the NumPy array access, it needs to reference the NumPy include files. These are located here:
~/.local/lib/python2.6/site-packages/numpy/core/include/numpy/ The "problem" I am having is that when I compile the cython extension, it is using libraries located here: /usr/include/python2.6/numpy This is inconsistent since when I import numpy, it is definitely using the version in ~/.local. I want to avoid setting INCLUDE_DIRS in my .bashrc. An obvious solution is that I should specify the proper include directory when I create the Extension instance in my setup.py. Something like: d = os.path.join(os.path.split(numpy.__file__)[0], "core", "include") Extension(... , include_dirs=[d]) Is this the proper/recommended way to handle this? More to the point, it seems like this should be done for the users. Perhaps numpy.distutils.extention.Extension should append the include path for NumPy. Or perhaps Cython can do this for the users? _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
