How to install Python modules needed by plugins?

Alexander Belchenko bialix at ukr.net
Wed Mar 9 10:26:03 UTC 2011


Eli Zaretskii пишет:
>> Date: Wed, 09 Mar 2011 10:09:46 +0100
>> From: John Arbash Meinel <john at arbash-meinel.com>
>> CC: Eli Zaretskii <eliz at gnu.org>, bazaar at lists.canonical.com
>>
>> Something like:
>>
>> C:\Program Files\Bazaar\site-packages
>>
>> I don't know if it can easily be done as part of bzr-windows-installers.
>> But certainly we could put in 'bzr':
>>
>>  if sys.frozen and sys.platform == 'windows':
>>    sys.path.append(os.path.join(os.path.dirname(sys.executable),
>>                                 'site-packages'))
> 
> Excuse me my ignorance, but why something like that is not already
> working?  

"like that" - like what?

> If Python-based installations automatically look in
> lib/python2.6/site-packages/ under my home directory, why doesn't the
> stand-alone installation do something similar?  It does include a DLL
> that is the Python interpreter, doesn't it?

Standalone bzr.exe uses different path for Python modules.

You can put the file path.py with the following content into your 
plugins directory:

#------------
import sys
print sys.path
#------------

And run any bzr command, e.g. `bzr rocks` and you will see what bzr.exe 
puts into sys.path

If you really want to understand what's going on under the hood you need 
learn how py2exe tool works.

-- 
All the dude wanted was his rug back



More information about the bazaar mailing list