[Distutils] Compiling / Installing extensions

Greg Ward gward@python.net
Tue, 8 Feb 2000 21:27:26 -0500

On 08 February 2000, Thomas Heller said:
> Yes, the /implib:build\temp\mymodule.lib
> puts the .lib AND the .exp files in a certain directory.
> So build_ext (or whatever) can prune the temp-directory.

OK, noted.  Let's wait to put it in until after I've changed the "build" 
commands to build to that temporary directory.

Oh, I think you said something about dealing with name conflicts between 
debugging and non-debugging versions.  For temp files, I think the
obvious solution is to make "debugging" another "architecture", e.g.

    build ---- temp.linux-x86


It's not so clear what to do for the final product (.pyd or .so
files)... but now that I think of it, if I'm going to allow
multi-architecture builds in the same place (someone tell me this is a
useful feature please!), then I should carry through and make the
"build/platlib" directory name the platform,
eg. "build/platlib.linux-x86".  Keep on thinking of "debugging mode" as
an aspect of the "architecture", and problem solved.  Seem reasonable?

> > Ugh.  OK, here's a deal: I'll put in the infrastructure for supporting a
> > "--debug" flag if you guys will figure out how to make it work with
> > MSVC++.  Fair enough?
> Fair enough. I'm waiting for your patch.

Done.  It's in CVS now.  (I take it from earlier comments that this is
enough for you, and a code snapshot is not necessary.)

> > > We should drop the line
> > >     self.add_library ( "python" + sys.version[0] + sys.version[2] )
> > > in msvccompiler.py.
> > 
> > Absoposidefinutely yes!  I guess by my evolving standard, that should go 
> > in the MSVC-specific code in build_ext.py.
> It is NOT NEEDED at all!
> The correct pythonxxx.lib will automatically be included on windows.

Cool!  That's good news.  I hate to keep sounding disbelieving of you,
but if there is a "25 words or less" explanation of why that works,
would you mind filling me in?  (Mainly I'm curious -- if you tell me not
to get worried about it, it's complicated but it just works, then I'll
probably trust you.  But I *do* like to know what's going on behind the

Greg Ward - all-purpose geek                            gward@python.net
A man wrapped up in himself makes a very small package.