Extension build fails on WXP

John Arbash Meinel john at arbash-meinel.com
Mon Aug 11 21:09:49 BST 2008


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

dhruva wrote:
> Hi,
> I was trying to build the extensions using MSVC 7 and MinGW32. Both fails at:
> 
> With VC7 (2003):
> running build
> running build_py
> running build_ext
> building 'bzrlib._walkdirs_win32' extension
> C:\users\dhruva\stub\repo\bzr\bzr.dev\bzrlib/_walkdirs_win32.pyx:65:15: Syntax error in C variable declaration
> 
> With MinGW32:
> running build
> running build_py
> running build_ext
> building 'bzrlib._walkdirs_win32' extension
> C:\users\dhruva\stub\repo\bzr\bzr.dev\bzrlib/_walkdirs_win32.pyx:65:15: Syntax error in C variable declaration
> 
> I am using Python 2.5.2 (not activestate though, I am going to try with activestate python)
> 
> I tried and it works with Activestate Python!
> 
> -dhruva

The issue is mostly about your Pyrex version. Python 2.5 introduced a
"Py_ssize_t" object to be used throughout the codebase for things which
might be 64-bit integers.

At that point, you would have to do your own hackery with:

cdef extern from "Python.h":
  ctypedef long Py_ssize_t

And then be wrong on any 64-bit platform, including a bad conversion
because 64-bit integer wouldn't fit in a PyInt.

So Pyrex included direct support for Py_ssize_t. So I'm pretty sure you
can just upgrade your Pyrex. I believe we support at least 1.6, because
that is in Hardy, so people gave me bug reports about it not working and
I fixed that (1.6 doesn't support +=, ^=, *=, etc, pyrex 1.8 does).

John
=:->

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

iEYEARECAAYFAkignIwACgkQJdeBCYSNAAPV8QCeIgoBAlZmsmRMsvNs/hCYLq8L
nOMAoKPyfRtdcMxeSFp6gg2rJI2MiqAt
=8FVh
-----END PGP SIGNATURE-----



More information about the bazaar mailing list