[RFC] _chunks_to_lines_pyx rebuild problem
Alexander Belchenko
bialix at ukr.net
Thu May 28 18:25:25 BST 2009
Martin Pool пишет:
> 2009/5/28 Alexander Belchenko <bialix at ukr.net>:
>> C extension _chunk_to_lines_pyx is imported by osutils.py. This import effectively preventing to delete compiled extension while all extensions rebuilding on Windows, because osutils is used by setup.py.
>
> This is understandable but may be surprising to unix developers; maybe
> you should put a note in osutils.py about this.
>
>> This is pain in the ass for me, when I need to rebuild extensions during `make exe` process. I'd like to get rid of this situation. Currently I have to remove this dll manually before running rebuild.
>>
>> Is it possible to move it's import to another module or make it lazy?
>> Please?
>
> It seems, it's only present in osutils to give it a standard name that
> saves callers from needing to work out whether to load the pyx or py
> version. It would be a shame to replicate the
> try:import:except:import everywhere, but you can certainly move it to
> some other location.
>
> In most cases we have say bzrlib.rio loading _rio_pyx. Possibly we
> need stringutils or something more specific than osutils.
>
> Alternatively perhaps what setup.py needs should be moved out of osutils.
Actually setup.py is importing bzrlib only (i.e. bzrlib/__init__.py).
But bzrlib/__init__.py has following code:
from bzrlib.osutils import get_user_encoding
# XXX: Compatibility. This should probably be deprecated
user_encoding = get_user_encoding()
How to deprecate user_encoding member and remove import of osutils in __init__?
More information about the bazaar
mailing list