_readdir_pyx extension cannot be compiled with MSVC

John Arbash Meinel john at arbash-meinel.com
Thu Oct 2 16:23:36 BST 2008


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

Alexander Belchenko wrote:
> building 'bzrlib._readdir_pyx' extension
> c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\bin\cl.exe /c
> /nologo /Ox /MD /W3 /GX /DNDEBUG -IC:\Python\2.5.1\include
> -IC:\Python\2.5.1\PC /Tcbzrlib/_readdir_pyx.c
> /Fobuild\temp.win32-2.5\Release\bzrlib/_readdir_pyx.obj
> _readdir_pyx.c
> bzrlib\_readdir_pyx.c(32) : fatal error C1083: Cannot open include file:
> 'dirent.h': No such file or directory
> Building of "bzrlib._readdir_pyx" extension failed, will use the Python
> version instead
> 

That's actually file. "_readdir_pyx" is only meant to be used on
platforms that use "readdir()" which is cygwin and POSIX, not win32.

What I don't understand is why it is *trying* to build it. At least
according to my setup.py:

if sys.platform == 'win32':
    add_pyrex_extension('bzrlib._dirstate_helpers_c',
                         libraries=['Ws2_32']
                       )
...
    add_pyrex_extension('bzrlib._walkdirs_win32',
                        define_macros=[('WIN32', None)])
else:
    add_pyrex_extension('bzrlib._dirstate_helpers_c')
    add_pyrex_extension('bzrlib._readdir_pyx')


Which says that if "sys.platform == 'win32'" build the "_walkdirs_win32"
extension, otherwise build the "_readdir_pyx" extension.

What is your sys.platform?

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjk53gACgkQJdeBCYSNAAOcXQCfTW8s1Q5eBa8wjcUce1kpVi+G
CGwAnj0Ah5IFJdSjU6HlrFCnOd/znxeG
=F0Um
-----END PGP SIGNATURE-----



More information about the bazaar mailing list