live-bootstrap/steps/python-2.5.6/patches/pyc.patch
2025-10-17 18:53:10 +11:00

26 lines
729 B
Diff

SPDX-FileCopyrightText: 2024 Samuel Tyler <samuel@samuelt.me>
SPDX-License-Identifier: PSF-2.0
Disable creation of pyc files.
--- Python-2.5.6/Lib/py_compile.py 2024-01-22 11:28:44.333395804 +1100
+++ Python-2.5.6/Lib/py_compile.py 2024-01-22 11:28:53.703636809 +1100
@@ -112,6 +112,7 @@
directories).
"""
+ return
f = open(file, 'U')
try:
timestamp = long(os.fstat(f.fileno()).st_mtime)
--- Python-2.5.6/Python/import.c 2024-01-22 12:24:59.390701654 +1100
+++ Python-2.5.6/Python/import.c 2024-01-22 12:25:18.643222249 +1100
@@ -869,6 +869,7 @@
static void
write_compiled_module(PyCodeObject *co, char *cpathname, time_t mtime)
{
+ return;
FILE *fp;
fp = open_exclusive(cpathname);