[MERGE] Fast _walkdirs for win32
Alexander Belchenko
bialix at ukr.net
Thu Jul 17 21:41:24 BST 2008
John Arbash Meinel пишет:
> Alexander Belchenko wrote:
> | John Arbash Meinel ?8H5B:
> |> Alexander Belchenko wrote:
>
> I was just confused and thought win32utils was from
> the pywin32 packaged, not part of the bzrlib code.
Ah, I understand your initial resistance now.
No, it's the part of bzrlib during very long time.
Just nobody but me noticed it :-)
> Yep, the change is small and easy to do. I'm happy to do so. Attached
> should include the changes you need to compile and support Win98.
Yes, but you made small error:
=== modified file 'setup.py'
--- setup.py 2008-07-17 12:55:11 +0000
+++ setup.py 2008-07-17 20:21:07 +0000
@@ -216,18 +216,22 @@
pyrex_name = path + '.pyx'
c_name = path + '.c'
if have_pyrex:
- ext_modules.append(Extension(module_name, [pyrex_name]))
+ ext_modules.append(Extension(module_name, [pyrex_name], **kwargs))
else:
if not os.path.isfile(c_name):
unavailable_files.append(c_name)
else:
- ext_modules.append(Extension(module_name, [c_name]))
+ ext_modules.append(Extension(module_name, [c_name], **kwargs))
add_pyrex_extension('bzrlib._dirstate_helpers_c')
add_pyrex_extension('bzrlib._knit_load_data_c')
if sys.platform == 'win32':
- add_pyrex_extension('bzrlib._walkdirs_win32')
+ # 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._walkdirs_win32',
+ define_macro=[('WIN32', None)])
^-- there should be "define_macros" -- i.e. plurals. Otherwise it won't work for me (again).
bb:tweak please.
You're real hero for windows users!
More information about the bazaar
mailing list