[RFC][win32] bzr.exe -- launcher for bzr script
Alexander Belchenko
bialix at ukr.net
Sun Jan 15 02:25:42 GMT 2006
I try to make exe launcher for bzr to use on win32. I slightly modify
Fredrik Lundh's exemaker source to allow exe to launch script without
.py extension. It's almost works.
There is one thing that I don't understand yet. Bzr script use this hack
to determine is python executed with -OO optimization option:
if __doc__ is None:
print "bzr does not support python -OO."
sys.exit(2)
Unfortunately, when bzr launched within exemakered exe launcher this
condition is True and bzr won't work. I slightly change this to:
if not __debug__ and __doc__ is None:
print "bzr does not support python -OO."
sys.exit(2)
And it works. Mostly because from exe python executed without -O/-OO
options. I make this assumption by the fact that in bzrlib no .pyo files
appeared after bzr execution.
Is this acceptable change to bzr script or there is right way to avoid
this inside exe? Attached patch will change condition to determine -OO
python optimization option.
My bzr.exe branch:
bzr branch http://bzr.onembedding.com/bzr.exe
--
Alexander
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: bzr.diff
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20060115/a7cd2172/attachment.diff
More information about the bazaar
mailing list