[Distutils] Duelling SWIG patches

Michel Sanner sanner@scripps.edu
Fri, 23 Jun 2000 11:38:59 -0700


I have been following the SWIG support discussion for a while.
I am not sure I see the point in having distutil run SWIG. Why not simply
provide the result or running swig as part of the source code that get's
compiled. There are a number of versions of SWIG that have different types of
arguments, in addition the interface might use user defined typemaps !

It seems to me that this would be very difficult to get to work properly and I
cannot see any real benefit.

-Michel

On Jun 23, 10:42am, Thomas Heller wrote:
> Subject: Re: [Distutils] Duelling SWIG patches
> > Well, I was inspired by Thomas' patch for SWIG support to come up with
> > my own patch.  Here it is: completely untested, so I haven't checked it
> > in yet.  (I don't have SWIG installed at home, so I figured I'd let
> > someone Out There who actually uses it test this for me.  Remember:
> > laziness is a virtue!)
> >
> > Note that Thomas' patch was Windows/C++-centric; mine tries to be
> > OS-agnostic, but is C-centric.  Is it possible to tell from a SWIG .i
> > file whether it is destined to be C or C++?  I can't think of a good way
> > to do it, but then my knowledge if SWIG is roughly epsilon.  (Out of
> > curiosity, I took the manual home and read it about three years ago.  It
> > struck me as being *way* to easy, and I wanted to write Perl extensions
> > like a *real* man.  Ahh, the folly of youth...)
> >
> I don't like this patch.
>
> While I won't argue whether ccompiler is an appropriate superclass
> for swig, swig shares some important properties:
>
> Swig has command line flags to specify include directories -I<dir>,
> libraries -l<ifile>, define symbols -Dsymbol like C-compilers.
> Other options which are maybe usefull for python extensions
> are -t <typemap file>, -shadow (create shadow classes),
> -module name (set module name) and maybe more.
>
> >From this I have the impression that swig should be a separate class
> implemented in swig.py, and there should be distutils command line
> flags for setting the above options (and also the -c++ option).
> Although I did not implement them so far.
>
> (Sidenote: I also needed a swig-object in build_ext for my setup-script
> for win32all. I had to extend distutils in the setup-script
> because there are also exe-files to be built from C++
> and swig sources).
>
> As I pointed out in a separate post, there should also be an option
> to specify C or C++ processing.
>
> If I find time, I will submit a new patch.
>
> Thomas
>
>
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG@python.org
> http://www.python.org/mailman/listinfo/distutils-sig
>-- End of excerpt from Thomas Heller



-- 

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

>>>>>>>>>> AREA CODE CHANGE <<<<<<<<< we are now 858 !!!!!!!

Michel F. Sanner Ph.D.                   The Scripps Research Institute
Assistant Professor			Department of Molecular Biology
					  10550 North Torrey Pines Road
Tel. (858) 784-2341				     La Jolla, CA 92037
Fax. (858) 784-2860
sanner@scripps.edu                        http://www.scripps.edu/sanner
-----------------------------------------------------------------------