path environment variables and ssh
Ted Pavlic
ted at tedpavlic.com
Fri May 9 07:48:44 CDT 2008
James --
If the Py version you want comes first in your PATH, then I don't think
you'll need to worry about PYTHONPATH. From the python man page:
=====
PYTHONHOME
Change the location of the standard Python
libraries. By default, the libraries are
searched in ${prefix}/lib/python<version> and
${exec_prefix}/lib/python<version>, where ${prefix} and
${exec_prefix} are installation-dependent directories,
both defaulting to /usr/local. When $PYTHONHOME is set to
a single directory, its value replaces both ${prefix} and
${exec_prefix}. To specify different values for these, set
$PYTHONHOME to ${prefix}:${exec_prefix}.
PYTHONPATH
Augments the default search path for module files. The
format is the same as the shell's $PATH: one or more
directory path- names separated by colons. Non-existent
directories are silently ignored. The default search
path is installation dependent, but generally begins
with ${prefix}/lib/python<version> (see PYTHONHOME
above). The default search path is always appended to
$PYTHONPATH. If a script argument is given, the directory
containing the script is inserted in the path in front
of $PYTHONPATH. The search path can be manipulated from
within a Python program as the variable sys.path .
=====
So, I'm *GUESSING* that you'll be fine just setting PATH so that the hg
and Python you want come first. The new Python will get grabbed, and it
will have the PYTHONPATH you want.
Now, if you have a super-special place for your Python modules (e.g., a
home directory somewhere), then you probably need to set PYTHONPATH or
else those modules will never be found.
--Ted
James Walker wrote:
> James Walker wrote:
>> Thanks for all your help! I have modified /etc/sshd_config and
>> ~/.ssh/environment on the remote machine, and now I no longer need to
>> set the remote command in the local .hgrc.
>
> Maybe I spoke too soon. The PATH setting in ~/.ssh/environment is
> definitely working, because if I remove it or set PATH to a bogus value,
> the remote hg isn't found. But if I set PYTHONPATH to a bogus value, it
> doesn't seem to make any difference. What does this mean, is it
> sometimes unnecessary to set PYTHONPATH?
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
>
--
Ted Pavlic <ted at tedpavlic.com>
More information about the Mercurial
mailing list