[Distutils] How do I modify the swig options in my setup.py

timothy.williams at nvl.army.mil timothy.williams at nvl.army.mil
Thu Mar 17 14:09:03 CET 2005


I had installed python 2.4, but went back to 2.3.2 for a reason I can't
remember now. I think some other module I was using wasn't built for it yet
(MySQLdb maybe?) I'll reinstall and try again.

I looked at the python/typemaps.i file. I may be able to use that to
redefine the functions I'm calling after I include the libraries header
files to define everything else.

-----Original Message-----
From: Lars Immisch [mailto:lars at ibp.de]
Sent: Wednesday, March 16, 2005 4:27 PM
To: timothy.williams at nvl.army.mil
Subject: Re: [Distutils] How do I modify the swig options in my setup.py

> I tried using swig_opts, but it didn't recognize it. I'm using python
> SWIG 1.3.21 if that matters.

Sorry. I should have mentioned that from the start:

The swig_opts extension only made it into Python 2.4b1, so you either 
need to upgrade Python or at least the version of distutils.

> I read over the typemaps some, but the libraries I'm trying to use have
> of typedefs in them, and I was hoping that the #include files for the
> library would take care of it. (Beside me just not understanding enough
> about typemaps to be comfortable using them.)

There are no hard and fast recommendations I would want to give, except 
reading typemap code, experimenting, and reading the resulting C code to 
get a feel how swig works.

Failing that, do create a minimal example of an entire interface file 
that shows your problem and send it to the swig mailing list.

I am sure that someone will help you there.

- Lars

More information about the Distutils-SIG mailing list