This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author philthompson10
Recipients philthompson10
Date 2016-01-04.16:13:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1451923993.52.0.708853061063.issue26007@psf.upfronthosting.co.za>
In-reply-to
Content
The use case is a packaging tool that can create a single executable for a Python application. Like similar tools it embeds frozen Python code (including the standard library) and is linked (often statically) against the interpreter library.

Executables are usually configured so that they cannot import packages from the filesystem. They can only import packages embedded in the executable. This is done directly, ie. the package is not written out to the filesystem and imported from there. This is done by a specially written importer.

The importer is installed by adding it to sys.path_hooks. However this must be done early on in the bootstrap process so that the parts of the standard library that are implemented as Python packages can be found by the installer. For example, the point at which the zipimport importer is added to sys.path_hooks is too late.

Currently a modified version of bootstrap_external.py is embedded in the executable which updates sys.path_hooks at the end of the _install() function.

What I would like is some way to avoid having to modify bootstrap_external.py to install a new importer sufficiently early in the bootstrap process to allow it to import the standard library.
History
Date User Action Args
2016-01-04 16:13:13philthompson10setrecipients: + philthompson10
2016-01-04 16:13:13philthompson10setmessageid: <1451923993.52.0.708853061063.issue26007@psf.upfronthosting.co.za>
2016-01-04 16:13:13philthompson10linkissue26007 messages
2016-01-04 16:13:13philthompson10create