Never create pyc files on filesystem

This commit is contained in:
fosslinux 2024-01-24 14:42:29 +11:00
parent 1665723b70
commit 67acb607f6
8 changed files with 126 additions and 46 deletions

View file

@ -0,0 +1,26 @@
SPDX-FileCopyrightText: 2024 fosslinux <fosslinux@aussies.space>
SPDX-License-Identifier: Python-2.0.1
Disable creation of pyc files.
--- Lib/py_compile.py 2024-01-22 11:28:00.291261389 +1100
+++ Lib/py_compile.py 2024-01-22 11:28:13.462600939 +1100
@@ -41,6 +41,7 @@
directories).
"""
+ return
import os, marshal, __builtin__
f = open(file)
try:
--- Python/import.c 2024-01-22 12:23:34.349395727 +1100
+++ Python/import.c 2024-01-22 12:23:30.299285640 +1100
@@ -672,6 +672,7 @@
static void
write_compiled_module(PyCodeObject *co, char *cpathname, long mtime)
{
+ return;
FILE *fp;
fp = open_exclusive(cpathname);