Integrating with Bazaar on Windows

Gordon Tyler gordon at doxxx.net
Fri Apr 30 00:22:49 BST 2010


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

On 4/29/2010 5:30 PM, John Arbash Meinel wrote:
> Gary van der Merwe wrote:
>> On Thu, Apr 29, 2010 at 10:29 PM, Adam Glauser <adamglauser at gmail.com> wrote:
>>> I've installed Bazaar 2.1.1 using the Windows .exe installer.  Python can't
>>> find the bzrlib module when I do `from bzrlib import workingtree`.
>>>  C:\Program Files\Bazaar\lib is in the PYTHONPATH.
>>>
>>> Is this expected?  What would be my next step to get Python to import from
>>> bzrlib?
> 
>> I don't have access to a Windows machine right now, so I can't check,
>> but I recall being able to adding C:\Program File\Bazaar\Libary.zip to
>> your python path.
> 
> I would guess you would need to add a little bit more than that, to get
> the dlls, etc into your path. But it may be 'lib' + 'library.zip' is enough.

set BZR_HOME=C:\Program Files (x86)\Bazaar
set PYTHONPATH=%BZR_HOME%\lib;%BZR_HOME%\lib\Library.zip

C:\>C:\Python25\python.exe
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import bzrlib
>>> bzrlib.version_info
(2, 1, 1, 'final', 0)

Note that it does not work with Python 2.6. It fails to find the modules
in the zip file, which is apparently due to "C:\Program Files
(x86)\Bazaar\lib\library.zip\os.pyo has bad magic" that I am assuming
means that the optimized bytecode form is incompatible between 2.5 and 2.6.

Ciao,
Gordon

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

iQEcBAEBAgAGBQJL2hTIAAoJEIrPJfWinA2uMCcH/127J7WLYVgouRJjMS/ry3OU
Fvx8bWIi/RVfU8PYI3RxYJUyvEa02E1mdB9j66Z1yddI5jBwfxhab47zutL/eGfq
uRrCFysWY4orxBb+BSOpZ4sk8qd2Uw5ogfGA5OX3gOGL9Ovpk7jHPyXZmiHa+KEL
ZobuCmEtza4mG8ENHbB0m70q1eQ8aH0rswk8L2wkQdP7iifGnYBUeeGYiesFgqto
B96jo3bzcMsjUOag5t9R1Z/xme2h5exbOl96kdFi6SVTKwqzL8QVzj2Mjf9QA0gk
ykejiaTuyFtycqOOhrC20PsJ7mHjVdVPxY71g5kYoSoIBbo4PuxtoLtQUBJbPQY=
=9P24
-----END PGP SIGNATURE-----



More information about the bazaar mailing list