bzr 1.14: Installing from source broken by default on Windows when compiling extensions
Gary van der Merwe
garyvdm at gmail.com
Fri May 1 16:24:25 BST 2009
On Fri, May 1, 2009 at 4:30 PM, John Arbash Meinel
<john at arbash-meinel.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
>
> It is a problem when using the pure python executable to build the
> pure-win32 extensions. It knows how to find 'gcc.exe' but not when that
> object is a symlink.
>
> If you set 'compiler = mingw' (or python setup.py -c mingw) it will
> search for C:\cygwin\bin\gcc.exe
> And it knows to pass '-mno-cygwin' so that you don't end up with a
> binary that is built against cygwin?.dll.
>
> I do this intentionally because I *don't* want to accidentally use the
> cygwin python and build cygwin extensions. (IIRC, cygwin python will
> actually build .dll files instead of .pyd, for a bit of special
> craziness, which means you can actually build *both* cygwin dlls and
> win32 dlls in the same place, as long as you build the win32 ones
> *first* so win32 python doesn't try to load the cygwin version.)
>
> John
> =:->
>
I just checked - I don't have cygwin's python installed, and it must
be using "pure-python" cause it's creating .pyd files.
Just to confirm - If I run
python setup.py build -c mingw32
in command prompt - I get :
building 'bzrlib._btree_serializer_c' extension
gcc -mno-cygwin -mdll -O -Wall -DWIN32 -IC:\Python25\include
-IC:\Python25\PC -c bzrlib/_btree_serializer_c.c -o
build\temp.win32-2.5\Release\bzrlib\_btree_serializer_c.o
Cannot build extension "bzrlib._btree_serializer_c".
Use "build_ext --allow-python-fallback" to use slower python
implementations instead.
error: command 'gcc' failed: No such file or directory
and from cygwin bash shell it works.
More information about the bazaar
mailing list