[Distutils] swig 1.3.x

Keith Jackson krjackson@lbl.gov
Thu Jan 2 23:36:03 2003

I've run into a bit of a problem in getting swig 1.3.x working with
distutils. Running swig on an interface file now produces two files
by default; a python shadow class file and the C/C++ wrap file.

For example:
swig -python example.i
produces example_wrap.c and example.py.
It then expects that the generated .so will be _example.so.

The problem is with the generated python file. How would we get it
added into the python modules. It looks like build_py runs before
build_ext, and even if they didn't there isn't a communication mechanism
to have one Command sub-class add information into another Command 
sub-class. Any thoughts about how this might be addressed?

If this can be solved, everything else seems to be working fine. 
Everything works fine for generating my modules since I don't use the 
automated shadow class generation of swig. Getting this working for both 
1.1.x and 1.3.x required minimal changes to the build_ext class.
Keith R. Jackson                        KRJackson@lbl.gov
Grid Technology Group			(510) 486-4401
Lawrence Berkeley National Laboratory  	http://www-itg.lbl.gov/~kjackson/