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

Pearu Peterson pearu at cens.ioc.ee
Tue Jan 17 11:01:11 CST 2006


On Tue, 17 Jan 2006, Alexander Belopolsky wrote:

> On 1/17/06, Andrew Straw <strawman at astraw.com> wrote:
>> ...
>> Also, as for as I know, the only packages that install things into
>> /usr/include/python2.x/packagename are Numeric and numarray, so I would
>> argue it's not "standard", (although it may have lots of history).
>
> I don't know what would qualify as "standard", but Numeric's header
> location is specifically mentioned in the distutils manual:
> """
> If you need to include header files from some other Python extension,
> you can take advantage of the fact that header files are installed in
> a consistent way by the Distutils install_header command. For example,
> the Numerical Python header files are installed (on a standard Unix
> installation) to /usr/local/include/python1.5/Numerical. (The exact
> location will differ according to your platform and Python
> installation.) Since the Python include
> directory--/usr/local/include/python1.5 in this case--is always
> included in the search path when building Python extensions, the best
> approach is to write C code like
>
> #include <Numerical/arrayobject.h>
> """

As I read this section, I have two thoughts: (i) it was written in Python 
1.5 days when distutils was first introduced, and back then I doubt that 
anyone thought about emergence of setuptools kind of tools - maybe future 
distutils will support setuptools better so that we treat header files 
like above, until then we can use the current working solution; and (ii) 
it all sounds like a recommendation, not a must-follow-or-something-will-break.

Pearu




More information about the Numpy-discussion mailing list