[Patches] [ python-Patches-401904 ] Better SWIG with C++ support

noreply@sourceforge.net noreply@sourceforge.net
Thu, 09 Aug 2001 08:51:46 -0700


Patches item #401904, was opened at 2000-10-13 23:06
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=401904&group_id=5470

Category: distutils
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jörg Baumann (jgbauman)
>Assigned to: Greg Ward (gward)
Summary: Better SWIG with C++ support

Initial Comment:
 

----------------------------------------------------------------------

>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-08-09 08:51

Message:
Logged In: YES 
user_id=6380

Reassigning this to Greg Ward -- maybe he can decide to
accept or reject this patch.

----------------------------------------------------------------------

Comment By: Jörg Baumann (jgbauman)
Date: 2000-10-13 23:07

Message:
I had troubles with distutils 1.0 and the way I use SWIG.
I couldn't find any support for the -shadow option and no way to pass an
extra include dir to swig (like it´s possible for the c compiler)

Therefore I wrote a patch.
It adds an extra_swig_args (list of string) option to Extension.
All the strings are passed to swig without modification, but
if extra_swig_args contains "-c++" or "-shadow" there is some special
action:
"-c++": behaves like build_ext --swig-cpp
"-shadow":
  Normally swig generates a file:
  foo.c -> foo.so
  In this case SWIG generates two files:
  foo.py (python shadow classes, imports fooc)
  fooc.c -> fooc.so
  With this patch build_ext can handle this und generates for foo.i
  (foo.py, fooc.c) compiles them and installs them.      


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=401904&group_id=5470