[BUG][0.90.0] './setup.py install' on systems without gcc didn't work for me

Alexander Belchenko bialix at ukr.net
Tue Sep 11 07:38:09 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Marius Kruger пишет:
> hi all
> I tried the following on a (debian) system without gcc installed:
> 
> ===
> bzr-0.90$ ./setup.py install
> 
> The python package 'Pyrex' is not available. If the .c files are available,
> they will be built, but modifying the .pyx files will not rebuild them.
> 
> running install
> running build
> running build_py
> running build_ext
> building 'bzrlib._dirstate_helpers_c' extension
> gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall
> -Wstrict-prototypes -fPIC -I/usr/include/python2.4 -c
> bzrlib/_dirstate_helpers_c.c -o build/temp.linux-
> i686-2.4/bzrlib/_dirstate_helpers_c.o
> unable to execute gcc: No such file or directory
> error: command 'gcc' failed with exit status 1
> ===
> 
> after playing around a little I think I figured out how to get it
> installed, by
> commenting the following lines out of setup.py:
> #add_pyrex_extension('bzrlib._dirstate_helpers_c')
> #add_pyrex_extension('bzrlib._knit_load_data_c')
> 
> 
> Should we have some sort of is_gcc_availible detection?
> or
> Should we have  a flag to tell 'setup install' not to try and build the
> c files?

In generic case if some python library want to build C-extension
it means that without such extension it cannot work correctly.
So standard distutils library does not have or support detection
of available compiler. (And this main reason why libraries with
C-extensions is hard to use on Windows without corresponding
python-based installer for exact Python version).

But Bazaar is different here, because our main goal -- "work even without C".
So if we need is_gcc_available() we should implement it by self.
I just want to point that on win32 it should check (by default)
availability of MSVC 7.1.

[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG5jfRzYr338mxwCURArNmAKCMP3uBY2BGfxUEj4VinZLSppoNmQCcCHIw
vsRUckV7wvW4C8SWhhkQoXw=
=jYX3
-----END PGP SIGNATURE-----



More information about the bazaar mailing list