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 christian.heimes
Recipients Alex.Willmer, christian.heimes, gvanrossum
Date 2021-12-01.15:34:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1638372868.47.0.982140813893.issue45949@roundup.psfhosted.org>
In-reply-to
Content
As of today 3.11-dev requires Programs/_freeze_module to compile Python code to byte code. The dependency on an extra and special tool makes cross building more complicated. The _freeze_module is trivial and can be easily implemented in pure Python code. The re-introduction of _bootstrap_python helper would allow us to use a pure Python freeze_module for all modules except two importlib bootstrap modules. I have a proof of concept implementation that works for me.

Proposal for standard builds:
- Use Programs/_freeze_module to create Python/frozen_modules/importlib._bootstrap.h and Python/frozen_modules/importlib._bootstrap_external.h
- build _bootstrap_python
- use new tool "./_bootstrap_python Tools/scripts/freezemodule.py" to create remaining Python/frozen_modules/*.h

Proposal for cross builds:
- use user-provider Python interpreter (./configure --with-build-python) to generate all Python/frozen_modules/*.h with new freezemodule.py tool.

When cross building the user must already provide a Python interpreter with same version and bytecode version as the build target. Users would no longer need to provide a _freeze_module binary with ./configure --with-freeze-module.
History
Date User Action Args
2021-12-01 15:34:28christian.heimessetrecipients: + christian.heimes, gvanrossum, Alex.Willmer
2021-12-01 15:34:28christian.heimessetmessageid: <1638372868.47.0.982140813893.issue45949@roundup.psfhosted.org>
2021-12-01 15:34:28christian.heimeslinkissue45949 messages
2021-12-01 15:34:28christian.heimescreate