Created
April 7, 2019 23:39
-
-
Save rofl0r/45d5c22a28ba346547ab2d0bad93bd7b to your computer and use it in GitHub Desktop.
Patch for python 2.7.15 to never write bytecode .pyc / .pyo files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Python-2.7.15.org/Python/pythonrun.c | |
+++ Python-2.7.15/Python/pythonrun.c | |
@@ -71,7 +71,7 @@ | |
int Py_InspectFlag; /* Needed to determine whether to exit at SystemExit */ | |
int Py_NoSiteFlag; /* Suppress 'import site' */ | |
int Py_BytesWarningFlag; /* Warn on str(bytes) and str(buffer) */ | |
-int Py_DontWriteBytecodeFlag; /* Suppress writing bytecode files (*.py[co]) */ | |
+int Py_DontWriteBytecodeFlag = 1; /* Suppress writing bytecode files (*.py[co]) */ | |
int Py_UseClassExceptionsFlag = 1; /* Needed by bltinmodule.c: deprecated */ | |
int Py_FrozenFlag; /* Needed by getpath.c */ | |
int Py_UnicodeFlag = 0; /* Needed by compile.c */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment