Make wxPython work under run from build directory on macOS

This commit is contained in:
Marek Roszko 2023-11-14 07:14:13 -05:00
parent e5f1cfd2b2
commit 34a51d3c21
1 changed files with 5 additions and 0 deletions

View File

@ -296,6 +296,11 @@ bool SCRIPTING::scriptingSetup()
pyhome += Pgm().GetExecutablePath() +
wxT( "Contents/Frameworks/Python.framework/Versions/Current" );
if( wxGetEnv( wxT( "KICAD_RUN_FROM_BUILD_DIR" ), nullptr ) )
{
pyhome = wxString( wxT( PYTHON_SITE_PACKAGE_PATH ) ) + wxT( "/../../../" );
}
// set $PYTHONHOME
wxSetEnv( wxT( "PYTHONHOME" ), pyhome );
#else