proposal - move bzrlib down a level
Robert Collins
robertc at robertcollins.net
Thu Sep 1 23:32:45 BST 2005
On Thu, 2005-09-01 at 09:49 -0400, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Robert Collins wrote:
> > You misunderstand me. I do not mean 'to run bzr', I mean to be able to
> > 'import bzrlib' from a different script in a different source tree.
>
> So if you actually install bzrlib, you don't have to muck with your
> PYTHONPATH, and there's no garbage. (btw, is there *any* satisfactory
> way to muck with one's PYTHONPATH? I don't want to stick the whole
> thing in my profile because I run more than one interpreter, and the
> system libs vary.)
install it where ? Take for instance the pqm install @ pqm.ubuntu.com.
I'm not the sysadmin, so I can't install bzrlib to the python
site-packages easily. If I install it to the source tree I'm working on
I get lovely noise that cant be updated without an rm -rf and a
re-install. Even if I do get our sysadmin to install it, I'm then stuck
with continual fiddling if we want to roll forward, or backwards. This
is a pretty typical scenario for stuff installed
not-on-ones-own-machine.
> So you only need to muck with the PYTHONPATH if you're following the
> bleeding edge, and then the garbage argument doesn't really hold-- the
> only thing that could possibly be misinterpreted is setup.py, and we can
> just re-commit if that changes.
I don't know what 're-commit if that changes' means. The presence of
setup.py in the python path means I can't (for instance) grab any other
setup.py (so now the order of the path matters rather than just being an
effective set).
With regard to PYTHONPATH fiddling, what I do is have a trivial wrapper
script when I need to run something that does require PYTHONPATH magic.
As for changes needed to bzr to deal with a lib dir rather than bzrlib
at the top dir of the source:
try:
import bzrlib
except ImportError:
sys.path.append(os.path.join(sys.argv[0],'..', 'lib'))
import bzrlib
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050902/e3ff5de2/attachment.pgp
More information about the bazaar
mailing list