Skip to content
Snippets Groups Projects
Commit b962a913ee3b authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

pyoxidizer: re-install PYTHONPATH behavior

Hooks and extensions can rely on PYTHONPATH value. Yet the pyoxidized binary
ignore the variable. So we manually reinstall the behavior to fix various tests
and restore the expected behavior.

This positively affects:
- test-extension.t
- test-hook.t

Differential Revision: https://phab.mercurial-scm.org/D11302
parent f07a00543396
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment