Message407459
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. |
|
Date |
User |
Action |
Args |
2021-12-01 15:34:28 | christian.heimes | set | recipients:
+ christian.heimes, gvanrossum, Alex.Willmer |
2021-12-01 15:34:28 | christian.heimes | set | messageid: <1638372868.47.0.982140813893.issue45949@roundup.psfhosted.org> |
2021-12-01 15:34:28 | christian.heimes | link | issue45949 messages |
2021-12-01 15:34:28 | christian.heimes | create | |
|