[Numpy-discussion] arrayobject.h (and friends) install location

Arnd Baecker arnd.baecker at web.de
Sun Jan 15 23:25:00 CST 2006


On Mon, 16 Jan 2006, David M. Cooke wrote:

> On Jan 15, 2006, at 14:23 , 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,

It seems that distutils is not loved that much
(E.g. Wax no longer uses distutils
http://zephyrfalcon.org/weblog2/arch_e10_00870.html#e878 )

> > so it may wind up being something
> > of a contortion to call numpy.get_numpy_include() from the build
> > system I need to use.
>
> You don't say what type of build system it is. If it's autoconf or
> Makefile based, you could do something like
>
> NUMPY_HEADERS=$(python -c 'import numpy; print numpy.get_numpy_include
> ()')
>
> > 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?
>
> For now, they're in the site-packages directory, under numpy/core/
> include. That position might change (it used to be numpy/base/
> include, for instance), if we rename modules again. They probably
> won't migrate to the python include directory for the reason they're
> not in there now (non-root users can't install there).

If I do a `python setup.py --prefix=$HOME/my_numpy install`,
this leads to

  ~/my_numpy/bin/f2py
  ~/my_numpy/lib/python2.3/site-packages/numpy/*

Wouldn't then a
  ~/my_numpy/include/numpy/*
be reasonable?

Presumably I am overlooking something, and I know that this
has been discussed in much detail before, but still ...

Best, Arnd




More information about the Numpy-discussion mailing list