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

Sasha ndarray at mac.com
Tue Jan 17 12:19:07 CST 2006


> This is new to me. Sofar I know that numpy has been succesfully built on
> various unix systems, on Windows, and on OSX. The end-of-lines of numpy
> headers have never caused any breakage afaik and numpy header files do not
> require pre-compilation. Could you give more specific examples of python
> platforms where building numpy extension modules could fail?
>

No, I cannot and as I've just checked as of python 2.4 distutils do
not process headers in any way.  In fact install_data and
install_headers commands are almost identical (both just copy files)
and that's why your code happens to work.

I did not say your code does not work on all platforms, I said it is
not guaranteed to work. Any change to distutils that makes
install_data and install_headers commands differ  will break your
code.

When I first installled numpy (it was still scipy_core back then) my
build scripts stopped working once I've changed #includes in my
source.  I tried to restore the old include location by changing
install_headers setting, but that had no effect. Then I've dicovered
that numpy does not use install_headers command at all.  Surely
everything was fixed by adding "include_dirs =
[numpy.get_numpy_include()]" to my setup scripts, but it took several
posts to various forums to discover that option. (I started by filing
a bug report on SF.)

Given that distutils manual specifically discouraged setting custom
include_dirs, many future users of numpy are bound to relive my
experience.  Also, imagine if more third party packages follow numpy
lead --- will I have to append an entry for each package to
include_dirs?

-- sasha




More information about the Numpy-discussion mailing list