Commit e1b7990e authored by Matt Harbison's avatar Matt Harbison
Browse files

pyoxidizer: add user-site to `sys.path` on Windows

This is a port of 53221078e0de to Windows to allow pip-installed extensions to
be loaded without specifying a path.  It's a major headache to have an hg.exe on
`PATH` that needs to have the path to the extensions specified, because WSL
doesn't see the same path.

This is only for Windows for now, to match the currently shipping py2 behavior.
There is a better solution with using the `site` package, but this needs support
in PyOxidizer[1].


Differential Revision:

branch : stable
parent ad2c37075f46
......@@ -44,6 +44,17 @@ if extra_path is not None:
# We do not prepend the values because the Mercurial library wants to be in
# the front of the sys.path to avoid picking up other installations.
# Add user site to sys.path to load extensions without the full path
if == 'nt':
vi = sys.version_info
'Python%d%d' % (vi[0], vi[1]),
import hgdemandimport;
from mercurial import dispatch;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment