Mercurial > public > mercurial-scm > hg
changeset 26664:640b807dcce0
exewrapper: add comments about PYTHONHOME
This has been a repeating source of confusion for users of HackableMercurial.
Note that users of HackableMercurial should *not* and are *not* expected to set
PYTHONHOME.
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Wed, 14 Oct 2015 12:23:49 +0200 |
parents | fa6858be3c61 |
children | 6331a0c310db |
files | mercurial/exewrapper.c |
diffstat | 1 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/exewrapper.c Wed Oct 14 12:23:04 2015 +0200 +++ b/mercurial/exewrapper.c Wed Oct 14 12:23:49 2015 +0200 @@ -67,10 +67,19 @@ } pydll = NULL; + /* + We first check, that environment variable PYTHONHOME is *not* set. + This just mimicks the behavior of the regular python.exe, which uses + PYTHONHOME to find its installation directory (if it has been set). + Note: Users of HackableMercurial are expected to *not* set PYTHONHOME! + */ if (GetEnvironmentVariable("PYTHONHOME", envpyhome, sizeof(envpyhome)) == 0) { - /* environment var PYTHONHOME is not set */ + /* + Environment var PYTHONHOME is *not* set. Let's see if we are + running inside a HackableMercurial. + */ p = strrchr(pyhome, '\\'); if (p == NULL) {