Submitter | phabricator |
---|---|
Date | Feb. 15, 2020, 4:30 a.m. |
Message ID | <differential-rev-PHID-DREV-lmvx5c2buevaxmgpuvxs-req@mercurial-scm.org> |
Download | mbox | patch |
Permalink | /patch/45249/ |
State | Superseded |
Headers | show |
Comments
mharbison72 added a comment. Does this also allow extensions to be bundled in the exe, or are you thinking we need to leave the extensions outside the binary? REPOSITORY rHG Mercurial CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8122/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8122 To: martinvonz, #hg-reviewers Cc: mharbison72, mercurial-devel
martinvonz added a comment.
In D8122#120939 <https://phab.mercurial-scm.org/D8122#120939>, @mharbison72 wrote:
> Does this also allow extensions to be bundled in the exe, or are you thinking we need to leave the extensions outside the binary?
I'm pretty sure this just tells the PyOxidized binary to *also* allow importing from file system. The bundled extensions are still imported properly from inside the binary.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8122/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8122
To: martinvonz, #hg-reviewers
Cc: mharbison72, mercurial-devel
This revision is now accepted and ready to land. indygreg added a comment. indygreg accepted this revision. This simply tells PyOxidizer to load the `sys.meta_path` importer that performs filesystem-based importing, like a normal Python process. https://pyoxidizer.readthedocs.io/en/stable/config_api.html#pythoninterpreterconfig REPOSITORY rHG Mercurial BRANCH default CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D8122/new/ REVISION DETAIL https://phab.mercurial-scm.org/D8122 To: martinvonz, #hg-reviewers, indygreg Cc: mharbison72, mercurial-devel
Patch
diff --git a/contrib/packaging/pyoxidizer.bzl b/contrib/packaging/pyoxidizer.bzl --- a/contrib/packaging/pyoxidizer.bzl +++ b/contrib/packaging/pyoxidizer.bzl @@ -21,6 +21,8 @@ config = PythonInterpreterConfig( raw_allocator = "system", run_eval = code, + # We want to let the user load extensions from the file system + filesystem_importer = True, # We need this to make resourceutil happy, since it looks for sys.frozen. sys_frozen = True, legacy_windows_stdio = True,