[Distutils] Duelling SWIG patches
Mon, 26 Jun 2000 21:45:34 -0400
On 26 June 2000, Thomas Heller said:
> but this is of course nonsense. Swig is used to build
> python-extensions, not exe-files. Sorry for that.
Yeah, but I'd still like to know if 'link_executable()' works on
Windows! I think it'd be really cool if part of building Distutils on
Windows was (optionally!) to compile your wininst stub, all using the
Distutils compiler interface...
(Yeah, I know, the Distutils shouldn't require a compiler or anything
> Appended is a patch for your swig patches (;-) which adds an --swig-cpp
> command line option to build_ext, so that I can build the win32 stuff again.
> There should probably better be an option for the Extension() class, but
> (hopefully) someone else can do this.
> This is in chunks 1, 2, 4, 5.
OK, the SWIG stuff is fine -- checked it in.
> Chunks 3 and 6 contain a change for building extensions on NT:
> MSVC generates .lib and .exp files when building shared libraries.
> The .exp files are usually unneeded, the .lib files are import libraries,
> which may be needed for (other) dlls linking to the first one.
> Up to now these files were created in the
> build/lib.win32/Release or build/lib.win32/Debug directories.
> Sometimes python extensions are dependend on each other.
> One example is the ODBC stuff included in Marks code:
> The odbc extension links dynamically to the dbi extension.
> So I changed build_ext to create the .lib (and .exp) files
> in the build/lib.win32 directory. Since they have different
> names for debug and release builds, no conficts occur: dbi.lib, dbi_d.lib.
OK, that's in too, although it took a while to sink in through my thick
skull -- so the checkin messages are a bit confused.
Hey, waitasec: you're referring to "build/lib.win32/Release" -- but the
code in front me of says
self.implib_dir = self.build_temp
which to me eyes (scanning build_ext.py and build.py) resolves to
"build/temp.win32", hence the Debug and Release directories are under
build/temp.win32, not build/lib.win32.
What's going on here? I'm confused... can someone explain my code to
me? ;-) (Well, let's face it, the Windows stuff in build_ext.py really
isn't my code...)
Greg Ward - Linux weenie email@example.com
Very few profundities can be expressed in less than 80 characters.