-add_pyrex_extension('bzrlib._btree_serializer_c')
add_pyrex_extension('bzrlib._knit_load_data_c')
if sys.platform == 'win32':
- add_pyrex_extension('bzrlib._dirstate_helpers_c',
- libraries=['Ws2_32']
- )
# pyrex uses the macro WIN32 to detect the platform, even though it should
# be using something like _WIN32 or MS_WINDOWS, oh well, we can give it the
# right value.
+ add_pyrex_extension('bzrlib._btree_serializer_c',
+ define_macros=[('WIN32', None)])
+ add_pyrex_extension('bzrlib._dirstate_helpers_c',
+ libraries=['Ws2_32'],
+ define_macros=[('WIN32', None)],
+ )
add_pyrex_extension('bzrlib._walkdirs_win32', define_macros=[('WIN32', None)])
else:
+ add_pyrex_extension('bzrlib._btree_serializer_c')
if have_pyrex and pyrex_version == '0.9.4.1':
# Pyrex 0.9.4.1 fails to compile this extension correctly
# The code it generates re-uses a "local" pointer and
Oh, it's a known Pyrex bug.
Workaround is the same as I do for walkdirs_win32: define macros WIN32.
Here the patch:
--- setup.py 2008-10-02 15:36:12 +0000
ext_modules. append( Extension( module_ name, [c_name], **kwargs))
+++ setup.py 2008-10-03 09:59:46 +0000
@@ -226,18 +226,21 @@
-add_pyrex_ extension( 'bzrlib. _btree_ serializer_ c') extension( 'bzrlib. _knit_load_ data_c' ) extension( 'bzrlib. _dirstate_ helpers_ c', ['Ws2_32' ] extension( 'bzrlib. _btree_ serializer_ c', macros= [('WIN32' , None)]) extension( 'bzrlib. _dirstate_ helpers_ c', ['Ws2_32' ], macros= [('WIN32' , None)], pyrex_extension ('bzrlib. _walkdirs_ win32',
define_ macros= [('WIN32' , None)]) extension( 'bzrlib. _btree_ serializer_ c')
add_pyrex_
if sys.platform == 'win32':
- add_pyrex_
- libraries=
- )
# pyrex uses the macro WIN32 to detect the platform, even though it should
# be using something like _WIN32 or MS_WINDOWS, oh well, we can give it the
# right value.
+ add_pyrex_
+ define_
+ add_pyrex_
+ libraries=
+ define_
+ )
add_
else:
+ add_pyrex_
if have_pyrex and pyrex_version == '0.9.4.1':
# Pyrex 0.9.4.1 fails to compile this extension correctly
# The code it generates re-uses a "local" pointer and