why do you need to delete bzrlib when installing

John Arbash Meinel john at arbash-meinel.com
Mon Apr 2 19:08:03 BST 2007


John Whitley wrote:
> John Arbash Meinel wrote:
>> Martin Pool wrote:
>>> If I do
>>>
>>>  python setup.py install --home ~
>>>
>>> it ought to overwrite ~/lib/python/bzrlib, but it does not seem to do
>>> so. [... deletia ...]
>>
>> AFAIK it has never worked. Even for "python setup.py install" where you
>> install to the global directory.
> 
> This is probably why I've seen a number of python installers that
> apparently do local installations by building an egg-based installer
> package then doing a local install of the egg.  AFAICT, that approach
> should avoid overinstall problems.
> 
> -- John

That does work, though I've seen other problems with eggs. (At least on
my Mac, the startup time when importing an egg is really long, which has
a pretty large impact when running 'bzr foo').

"Long" is something like 570ms when 'bzr status' only takes 1s to finish.

$ python -m timeit -s "from subprocess import call" \
   "call(['python', '-c', 'import setuptools'])"
10 loops, best of 3: 571 msec per loop

$ python -m timeit -s "from subprocess import call" \
   "call(['python', '-c', ''])"
10 loops, best of 3: 97.8 msec per loop

$ python -m timeit -s "from subprocess import call" \
   "call(['bzr', '--no-plugins', 'status'])"
10 loops, best of 3: 1.31 sec per loop

This isn't entirely a fair comparison, because we could easily be
already importing things that setuptools depends on.

(By the way, regex compiling seems extra slow on my mac versus Linux.
I'm not entirely sure why, though).

John
=:->



More information about the bazaar mailing list