I just got confirmation that my original post to this sig was rejected, so
in case people have been wondering what David was talking about last week: I
sent a set of files to get distutils working on NT. I sent this message to
Greg, David, and the list. Unfortunately, it was rejected from the list
being too big (40K).
Greg suggested I resend the original pieces in smaller chunks: the patches
to the main distribution, MSVCCompiler.py, and a small sample setup.py
showing what I used to build NumPy on NT. Would anyone be interested in
taking a look at these before Greg gets back from the O'Reilly Open Source
conference next week? If so, drop me a note. I'll either email it or post it
to the list in smaller chunks if interest warrants. Otherwise I'll wait
until Greg takes a look and incorporates them into the main distribution as
he sees fit.
Here's the text that accompanied my first post:
Nice work, Greg! I thought I'd let David take a break on this one, so
attached is an MSVCCompiler, which works for me using MSVC 5.0. Not much has
changed on the command line usage for MSVC 6.0, so this should probably work
Also, I've attached a bunch of context diffs against the main distribution.
Some bug fixes, a couple other changes (like a working spawn for NT).
Oh, right. I also managed to use this to compile NumPy on Windows. I've
attached the setup script I used for that, too. This showed that we have a
few more issues to shake out, but it's looking good!
Comments on the changes (the attached diff file) and other things I noticed:
1 ) You'll notice that I added static attributes to both UnixCompiler and
MSVCCompiler to hold the normal extensions for object files, shared
libraries, static libraries, and executables (those _obj_ext, _exe_ext
Also, added method object_name and shared_library_name, I needed this to
get some of the test scripts (like test_cc.py) to make sense and be more
portable. We might rethink how this info is actually accessed.
2) I needed to pass the build info to the link_shared_object methods of
ccompiler. In this case, I needed to specify the .def file for linking the
dynamic libraries. Is this ok? How else are we going to let platform
specific build info get passed? This worked for now, but it's not great.
3) Added .cpp as an allowable extension. This is almost mandatory for doing
any development on NT, since this is the default extension MSVC for a new
4) Modified test/test_cc.py to be a bit more readable (my preference, feel
free to ignore).
5) Had to do some awful mucking in sysconfig, as you probably know. Still
have a way to go until it really works.
6) build_py doesn't do the right thing if there are no py_modules in setup.
7) A couple bug fixes in install_py
If you have any questions about the patches, just ask.
From: David Ascher <da(a)ski.org>
To: Perry A. Stoll <pas(a)scansoft.com>
Cc: Greg Ward <gward(a)cnri.reston.va.us>; distutils-sig(a)python.org
Date: Thursday, August 19, 1999 11:20 PM
Subject: Re: [Distutils] Can now compile simple extensions
>On Thu, 19 Aug 1999, Perry A. Stoll wrote:
>> Nice work, Greg! I thought I'd let David take a break on this one, so
>> attached is an MSVCCompiler, which works for me using MSVC 5.0. Not much
>> changed on the command line usage for MSVC 6.0, so this should probably
>> there also.
>Great! It's a very good thing for Greg given his talk on Monday! A very
>good thing for me (for obvious reasons), and, of course, a very good thing
>for Python users worldwide.