[Updated] D11302: pyoxidizer: re-install PYTHONPATH behavior
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Thu Aug 19 01:20:37 UTC 2021
Closed by commit rHGb962a913ee3b: pyoxidizer: re-install PYTHONPATH behavior (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D11302?vs=29931&id=29953
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11302/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11302
AFFECTED FILES
rust/hgcli/pyoxidizer.bzl
CHANGE DETAILS
diff --git a/rust/hgcli/pyoxidizer.bzl b/rust/hgcli/pyoxidizer.bzl
--- a/rust/hgcli/pyoxidizer.bzl
+++ b/rust/hgcli/pyoxidizer.bzl
@@ -36,6 +36,14 @@
# Code to run in Python interpreter.
RUN_CODE = """
+import os
+import sys
+extra_path = os.environ.get('PYTHONPATH')
+if extra_path is not None:
+ # extensions and hooks expect a working python environment
+ # 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.
+ sys.path.extend(extra_path.split(os.pathsep))
import hgdemandimport;
hgdemandimport.enable();
from mercurial import dispatch;
To: marmoute, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210819/ba3be740/attachment-0002.html>
More information about the Mercurial-patches
mailing list