mirror of
https://github.com/python/cpython.git
synced 2024-11-28 04:15:11 +08:00
08285d563e
In the list of generated frozen modules at the top of Tools/scripts/freeze_modules.py, you will find that some of the modules have a different name than the module (or .py file) that is actually frozen. Let's call each case an "alias". Aliases do not come into play until we get to the (generated) list of modules in Python/frozen.c. (The tool for freezing modules, Programs/_freeze_module, is only concerned with the source file, not the module it will be used for.) Knowledge of which frozen modules are aliases (and the identity of the original module) normally isn't important. However, this information is valuable when we go to set __file__ on frozen stdlib modules. This change updates Tools/scripts/freeze_modules.py to map aliases to the original module name (or None if not a stdlib module) in Python/frozen.c. We also add a helper function in Python/import.c to look up a frozen module's alias and add the result of that function to the frozen info returned from find_frozen(). https://bugs.python.org/issue45020 |
||
---|---|---|
.. | ||
_freeze_module.c | ||
_testembed.c | ||
freeze_test_frozenmain.py | ||
python.c | ||
README | ||
test_frozenmain.h | ||
test_frozenmain.py |
Source files for binary executables (as opposed to shared modules)