How to install Python modules needed by plugins?
Eli Zaretskii
eliz at gnu.org
Wed Mar 9 10:38:39 UTC 2011
> Date: Wed, 09 Mar 2011 12:26:03 +0200
> From: Alexander Belchenko <bialix at ukr.net>
> CC: John Arbash Meinel <john at arbash-meinel.com>,
> 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?
Like bzr (or its Python interpreter) looking in site-packages
subdirectory of some directory.
> 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
Thanks for this. I wish I knew this trick a few days ago, then I'd
realized much sooner that library.zip is my only chance.
> If you really want to understand what's going on under the hood you need
> learn how py2exe tool works.
On to read about that. Thanks again for pointing me to the right
place to look.
More information about the bazaar
mailing list