From a2e66f666717e21be655ced209a6b158df10f69e Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Thu, 10 Mar 2022 11:17:24 -0800 Subject: [PATCH] Don't write bytecode on MacOS MacOS packages are signed and checked on each run. Since Python lives inside the package, adding byte code will break the package signature (cherry picked from commit 5881471a520aca6328b1a8c2946bff90c8fe0de2) --- scripting/python_scripting.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripting/python_scripting.cpp b/scripting/python_scripting.cpp index e292887ff0..9b74709fc6 100644 --- a/scripting/python_scripting.cpp +++ b/scripting/python_scripting.cpp @@ -156,6 +156,10 @@ bool SCRIPTING::scriptingSetup() #endif #elif defined( __WXMAC__ ) + // Prevent Mac builds from generating JIT versions as this will break + // the package signing + wxSetEnv( "PYTHONDONTWRITEBYTECODE", "1" ); + // Add default paths to PYTHONPATH wxString pypath;