[Numpy-discussion] arrayobject.h (and friends) install location
pearu at cens.ioc.ee
pearu at cens.ioc.ee
Mon Jan 16 13:45:01 CST 2006
On Sun, 15 Jan 2006, Zachary Pincus wrote:
> >> Or is this a policy change which puts the headers in the site-
> >> packages
> >> directory?
> >
> > This is not an error. Use numpy.get_numpy_include() to retrive the
> > directory of numpy header files. See numpy.get_numpy_include.__doc__
> > for more information.
>
> Thanks for the information. Unfortunately, the package I'm working on
> can't be built with distutils, so it may wind up being something of a
> contortion to call numpy.get_numpy_include() from the build system I
> need to use.
>
> Understanding that the optimal, preferred method of finding the
> include dir will always be numpy.get_numpy_include(), if I must
> resort to a suboptimal method of guessing likely locations, what will
> those locations be?
>
> Are they generally within the site-packages directory? Sometimes in
> the python include directory? Will they be ever-changing?
If you install numpy, it's header files, e.g. numpy/arrayobject.h, always
endup in numpy/core/include directory. So, using
import numpy
os.path.join(os.path.dirname(numpy.__file__),'core','include')
should always return correct path to numpy header files.
Pearu
More information about the Numpy-discussion
mailing list