[Distutils] RE: Function discussions...

Michel Sanner Michel Sanner <sanner@scripps.edu>
Thu Sep 27 15:13:00 2001


> Date: Thu, 27 Sep 2001 13:09:14 -0500
> From: Tarn Weisner Burton <twburton@mailaps.org>
> Subject: RE: Function discussions...
> To: Michel Sanner <sanner@scripps.edu>
> Cc: "Mike C. Fletcher" <mcfletch@users.sourceforge.net>
> MIME-version: 1.0
> X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
> Content-transfer-encoding: 7BIT
> Importance: Normal
> X-Priority: 3 (Normal)
> X-MSMail-priority: Normal
> 
> | here is the end of the output:
> |
> | creating build/temp.irix64-6.5-2.1
> | cc -O -OPT:Olimit=0 -DGLX_PLATFORM -DNUMERIC
> | -I/tsri/python/share/include/python2.1 -I/usr/include
> | -I/usr/local/include
> | -I/usr/X11/include -I/tsri/python/share/include/python2.1/Numeric
> | -I/tsri/python/share/include/python2.1/Numeric_17
> | -I/tsri/python/share/include/python2.1/Numeric_18 -Isrc/gle/src
> | -I/usr/include
> | -I/usr/local/include -I/usr/X11/include
> | -I/tsri/python/share/include/python2.1/Numeric
> | -I/tsri/python/share/include/python2.1/Numeric_17
> | -I/tsri/python/share/include/python2.1/Numeric_18 -Isrc/gle/src -c
> | src/interface_util/interface_util.c -o
> | build/temp.irix64-6.5-2.1/interface_util.o
> |
> | cc-1005 cc: ERROR File =
> | /tsri/python/share/include/python2.1/Python.h, Line =
> | 24
> |   The source file "config.h" is unavailable.
> |
> |   #include "config.h"
> |                      ^
> |
> | 1 catastrophic error detected in the compilation of
> | "src/interface_util/interface_util.c".
> | Compilation terminated.
> | error: command 'cc' failed with exit status 2
> 
> I'm not sure if there is anything I can do to fix this.  You might try
> making sure that you have the most recent version of distutils.  Aside from
> that it should work since others have installed on Irix 6.5 successfully.
> Maybe something in the python installation is munged up.  The include
> directories selected for the python system are done by distutils and not by
> the PyOpenGL setup directly....
> 

I updated our Distutils from 1.0.2.pre to 1.0.2 and still get the same error. 
This sounds like a bug in Distutils to me. It seems that it automatically adds 

sys.prefix+'/include/python'+sys.version[:3] to the include directories, which 
works fine as long as your Python interpreter is installed under sys.prefix in 
which case config.h is really in sys.prefix+'/include/python'+sys.version[:3].

But I believe that it still is legal to install Python specifying 
sys.exec_prefix, in which case config.h is found in

	sys.exec_prefix+'/include/python'+sys.version[:3]
	
I checked with Sophie Coon (who has used Disutils previousely to build 
extensions here) and she confirmed that she had to add this directory explicitly 
using the setup.py file.

For PyOpenGL, we tried to add:

depInclude = sys.exec_prefix + '/include/python' + sys.version[:3]

and:

	   libraries = [('interface_util',
			 
{'sources':['src/interface_util/interface_util.c','src/interface_util/platform.c
'],
			  'include_dirs' : [depInclude]}),

but the directory still does not show up on the compilation line :(

-Michel