mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
bpo-45949: Pure Python freeze module for cross builds (GH-29899)
This commit is contained in:
parent
a62be77266
commit
eb483c46d6
9 changed files with 205 additions and 115 deletions
|
@ -393,13 +393,14 @@ _Py_get_%%NAME%%_toplevel(void)
|
|||
}
|
||||
"""
|
||||
|
||||
FROZEN_COMMENT = "/* Auto-generated by Programs/_freeze_module.c */"
|
||||
FROZEN_COMMENT_C = "/* Auto-generated by Programs/_freeze_module.c */"
|
||||
FROZEN_COMMENT_PY = "/* Auto-generated by Programs/_freeze_module.py */"
|
||||
|
||||
FROZEN_DATA_LINE = r"\s*(\d+,\s*)+\s*"
|
||||
|
||||
|
||||
def is_frozen_header(source: str) -> bool:
|
||||
return source.startswith(FROZEN_COMMENT)
|
||||
return source.startswith((FROZEN_COMMENT_C, FROZEN_COMMENT_PY))
|
||||
|
||||
|
||||
def decode_frozen_data(source: str) -> types.CodeType:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue