[wxPython-users] Re: wxPython extensions and swig directors together?

Robin Dunn robin at alldunn.com
Thu Jul 20 17:34:22 PDT 2006


Jim wrote:
> Robin Dunn <robin <at> alldunn.com> writes:

> ----- and now for something completely different -------
> 
> What did you think of the distutils setup.py for the 
> extenion building?   

It was good.  I had to make a couple changes to get it to work for me 
though.

1. I wanted to use my wxPython project dir for the source instead of the 
wxPython-win32-devel tarball, so in addition to changing wxpy_devel_dir 
I needed to add os.path.join(wxpy_devel_dir, "wxPython/include") to 
includeDirs and add a -I%s/wxPython/src to swig_opts

2. Since I wanted to build for the debug version I needed to replace the 
'h' with 'd' in the lib names and in the vc_dll subdir.

3. My swig 1.3.27 is not the one on the path so I needed to add a 'swig' 
item to the build_ext options to give it the full path name to the 
swig.exe to use.

> Is it Wiki material?  

I think so, with a few tweaks to make it more general purpose.  For 
example #2 above could be fixed in the code by checking for --debug or 
-g on the command line.

Also, you can import wx.build.config and get lots of things directly 
from wxPython, like the list of includes, defines, libs, swig flags, 
etc., plus a bunch of functions to help with various parts of the build.


-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list