distutils & Cygwin compiler on Win32
Hi, did anyone ever try to use the Cygwin compiler on Win32 with distutils? If not, then I'm the first. You can find a compiler class for this purpose at http://www.informatik.htw-dresden.de/~htw7192/distutils-cygwin/ there is also some additional information about some problem it still has. It is not completly tested, so if anyone want to test, use or debug it, she is free to do so. (I used it to build some dll's, the complete rest was not tested.) (PS: It works probably with mingw32, too. I used cygwin in no-cygwin mode, which is same as mingw32, I think.) Kind regards Rene Liebscher
On 17 May 2000, Rene Liebscher (Rene.Liebscher@htw-dresden.de) said:
did anyone ever try to use the Cygwin compiler on Win32 with distutils?
If not, then I'm the first.
Cool! Looks like a good start, but it needs work. First, I will never in a million years accept a patch that is mostly cut 'n pasted from existing source code. Please, *please* take advantage of OO techniques and *subclass* UnixCCompiler rather than copy it! If you're not sure how to do this, I'd be happy to help. But it looks as though a number of methods are straight copies of UnixCCompiler methods... ie. they should just be inherited from UnixCCompiler. Changing the compiler-selection code in ccompiler.py should not be necessary; users can use the "--compiler" option to "build_ext" to select an alternate compiler. (That was added to support Borland's compiler.) I spotted an instance of spawning bash to do some sed and grep trickery. Ugh! Please recode this as a Python function. I wouldn't even do this on Unix, much less Windows. Why are large chunks of code wrapped in ''' ? Is that a weird way of commenting stuff out? Please don't do that -- Python has a perfectly good comment character. Finally, has anyone submitted the config.h that works with Cygwin to Guido? I'm not sure how many people will be inclined to change Python's config.h. Send patches to patches@python.org. I for one think it would be great if Python 1.6 could build on Windows with something other than MSVC, although I have no idea if this is a priority for Guido. Oh, could someone explain to me the differences between cygwin and mingw32? I gather they both have something to do with using GCC and/or other GNU tools on Windows, but that's all I know. Greg -- Greg Ward - nerd gward@python.net http://starship.python.net/~gward/ Do I have a lifestyle yet?
Oh, could someone explain to me the differences between cygwin and mingw32? I gather they both have something to do with using GCC and/or other GNU tools on Windows, but that's all I know.
The long answers can be found on the two projects' respective home pages: http://sourceware.cygnus.com/cygwin http://www.mingw.org The short answer goes something like this: MinGWin32 stands for "minimalist GNU-Win32" and the purpose of that project is to allow you to use GNU development tools to create native Win32 applications that don't rely on any 3rd party DLLs. In other words, if you've got yer basic Win32 program that would compile under one of the commercial compilers like Visual C++ or Borland C++, you can now use gcc to do the same. This is in contrast to the Cygwin project, which provides a kind of Unix emulation layer through the Cygwin API. Programs built on Cygwin obviously depend on the Cygwin runtime library (cygwin1.dll) and I'm not entirely clear on the licensing issues there. But the upshot is that a majority of the free software available for Unix compiles out-of-the-box under Cygwin. Several of the links from the Cygwin page are impressive lists of all the stuff that works under Cygwin with minimal or no patches to the source.
participants (3)
-
Greg Ward
-
Lyle Johnson
-
Rene Liebscher (Rene.Liebscher@htw-dresden.de)