[Distutils] Re: [4suite] Re: Compiling 4Suite 0.10.2beta on Windows
Jason Tishler
Jason.Tishler@dothill.com
Mon Feb 19 14:38:02 2001
Martin,
On Sun, Feb 18, 2001 at 10:55:03AM +0100, Martin v. Loewis wrote:
> > I wouldn't say that using Cygwin is a bad idea -- I'd rather state that
> > if you do so then your extension is dependent on Cygwin's POSIX emulation
> > layer (i.e., cygwin1.dll) and that you need Cygwin Python to execute it.
>
> That's what I meant - if you have an MSVC-built Python, than a
> cygwin-built extension probably won't work, will it?
In my limited experimentation, Cygwin extensions do not work with a MSVC
Python. Given that they link with the Cygwin Python import library
(and import from the Cygwin Python DLL) as opposed to a MSVC one, I
didn't really expect it to work. However, Rene seems to indicate that
at least "simple" Cygwin extensions should work with MSVC Python in the
following:
On Mon, Feb 19, 2001 at 01:02:03PM +0100, Rene Liebscher wrote:
> With --compiler=mingw32 compiled extensions run without problems on an
> MSVC built Python.
>
> Some simpler examples also worked when compiled with --compiler=cygwin
> (I never tested it thorougly because I prefer not to need an additional
> dll.)
> > However, Python 2.1a2 builds OOTB under Cygwin and supports both the
> > traditional (i.e. Misc/Makefile.pre.in) and distutils methods of
> > building shared extensions.
>
> That's good to hear. So what about using Cygwin to build
> distutils-made extensions when the Python installation was built with
> MSVC?
The most recent Cygwin gcc release (i.e., gcc-2.95.2-7) nows binds
executables against msvcrt.dll instead of crtdll.dll when the Mingw mode
(i.e., "-mno-cygwin" option) is specified. IMO, using Cygwin's gcc in
Mingw mode to built MSVC Python extensions is now a viable alternative
to the real Mingw gcc.
I'm not that knowledgeable with distutils, so again I will quote from
Rene's email:
On Mon, Feb 19, 2001 at 01:02:03PM +0100, Rene Liebscher wrote:
> For MinGW and Cygwin in MinGW-mode it is --compiler=mingw32
>From the above, it sounds like distutils is already setup to use Cygwin
gcc in Mingw mode, so it seems like we are good to go.
Jason
--
Jason Tishler
Director, Software Engineering Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp. Fax: +1 (732) 264-8798
82 Bethany Road, Suite 7 Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA WWW: http://www.dothill.com