[Distutils] Duelling SWIG patches
Fri, 23 Jun 2000 22:07:52 -0400
On 23 June 2000, Michel Sanner said:
> 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 !
I see it as mainly a convenience feature. If Distutils *doesn't*
provide a SWIG interface, then every developer who wants to distribute
SWIG'ged code will have to write a little bit of code to run SWIG before
they build or distribute their code.
Ooh, that raises a thorny point: the "sdist" command needs to know about
any processing that has to be done before building a source
distribution, such as running SWIG so that end-users don't need SWIG to
build the extension.
Yet another good reason to have a SWIG interface independent of the
build_ext command: but there's still the problem that the proposed way
of communicating "here are my SWIG interface files" is in the list of
Extension objects "owned" by build_ext. I think "build_ext" (or maybe
"build") should grow a method or two that "sdist" can use to find out if
there are any SWIG files to SWIGify before distributing. We can worry
about a general "preprocess these files in this way before distributing"
mechanism some other day.
Greg Ward - just another /P(erl|ython)/ hacker firstname.lastname@example.org
All programmers are playwrights and all computers are lousy actors.