installing mercurial without changing PYTHONPATH

Satish Balay balay at fastmail.fm
Thu Jun 22 12:58:27 CDT 2006


The installation instructions for mercurial say : 
[from http://www.selenic.com/mercurial/wiki/index.cgi/UnixInstall]

>>>>>>
Per-user installation (recommended for now)

To install in your home directory (~/bin and ~/lib, actually), run:

$ python setup.py install --home=~
$ export PYTHONPATH=${HOME}/lib/python  # bash syntax, ymmv
$ export PATH=${HOME}/bin:$PATH         # add these to your .bashrc
>>>>>>>

Instead of having to set PYTHONPATH - why not have
'prefix-path/bin/hg' modified [during install] to use the correct path
with something like:

>>>>
import sys
sys.path.insert(0,'prefix-path/lib/python')
from mercurial import commands
>>>

I think this would be a more user friendly - and allows one to have
multiple installs of mercurial [by just using the correct path to 'hg'
- without worring about choosing the correct PYTHONPATH for the chosen
version of hg]

BTW: Whats the difference between '--prefix' & '--home' options to setup?

Thanks,
Satish


More information about the Mercurial mailing list