mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-06 03:15:23 +01:00
Never create pyc files on filesystem
This commit is contained in:
parent
1665723b70
commit
67acb607f6
8 changed files with 126 additions and 46 deletions
25
steps/python-2.3.7/patches/pyc.patch
Normal file
25
steps/python-2.3.7/patches/pyc.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
SPDX-FileCopyrightText: 2024 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: PSF-2.0
|
||||
|
||||
Disable creation of pyc files.
|
||||
--- Lib/py_compile.py 2024-01-22 11:28:44.333395804 +1100
|
||||
+++ 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/import.c 2024-01-22 12:24:05.300236204 +1100
|
||||
+++ Python/import.c 2024-01-22 12:24:36.513082356 +1100
|
||||
@@ -807,6 +807,7 @@
|
||||
static void
|
||||
write_compiled_module(PyCodeObject *co, char *cpathname, long mtime)
|
||||
{
|
||||
+ return;
|
||||
FILE *fp;
|
||||
|
||||
fp = open_exclusive(cpathname);
|
||||
Loading…
Add table
Add a link
Reference in a new issue