This is an archive of the discontinued Mercurial Phabricator instance.

pyoxidizer: allow extensions to be loaded from the file system
ClosedPublic

Authored by martinvonz on Feb 14 2020, 11:30 PM.

Details

Summary

It seems that setting this config is all that's needed to be able to
load extensions from the file system (which we clearly want). Thanks
for making this work, Gregory Szorc!.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Feb 14 2020, 11:30 PM

Does this also allow extensions to be bundled in the exe, or are you thinking we need to leave the extensions outside the binary?

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.

indygreg accepted this revision.Feb 15 2020, 4:54 PM

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

This revision is now accepted and ready to land.Feb 15 2020, 4:54 PM