|
From: Sasha <nd...@ma...> - 2006-01-07 06:05:21
|
Ok, I've found it: http://www.scipy.org/documentation/mailman?fn=3Dscipy-dev/2005-September/00= 3238.html Sorry for the extra traffic. Let me paraphrase the solution here to hopefully make it more discoverable: """ Extension modules that need to compile against numpy should use get_numpy_include function to locate the appropriate include directory. Using distutils: import numpy Extension('extension_name', ... include_dirs=3D[numpy.get_numpy_include()]) """ -- sasha On 1/7/06, Sasha <nd...@ma...> wrote: > On 1/7/06, Andrew Straw <str...@as...> wrote: > > ... There was discussion about this a couple of months ago. > > Could you, please give me some keywords for this discussion? I > searched the archives and the only relevant thread was from 2002 > (http://aspn.activestate.com/ASPN/Mail/Message/scipy-dev/1592700). I > understand that at that time there was a solution involving > sitecustomize.py, but that was replaced with site.cfg some time ago. > > The message that I cited above has a much better description of the > problem that I am experiencing than what I wrote: > > > (1) include directories. > > Distutils knows to include files from /usr/include/python2.2 (or > > wherever it is installed) whenever building extension modules. > > Numeric installs its header files inside this directory when installed > > as root. However, when I install Numeric in /home/eric/linux, the > > header files are installed in /home/eric/linux/python2.2. Distutils > > doesn't know to look in hear for headers. To solve this, I'd have to > > hack all the setup.py files for modules that rely on Numeric to use my > > include_dirs. This isn't so nice. > > Thanks. > > -- sasha > |