Pass configured Python interpreter in to use for BOM plugins
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8594
This commit is contained in:
parent
8f9800f760
commit
27932883d9
|
@ -99,4 +99,7 @@
|
|||
/// When pkg-config config is not available for ngspice, use ngspice/config.h for version.
|
||||
#cmakedefine NGSPICE_HAVE_CONFIG_H
|
||||
|
||||
/// Path to the python executable that should be used by KiCad
|
||||
#define PYTHON_EXECUTABLE "@PYTHON_EXECUTABLE@"
|
||||
|
||||
#endif // CONFIG_H_
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
|
||||
#include "bom_plugins.h"
|
||||
#include <config.h>
|
||||
#include <paths.h>
|
||||
#include <wx/ffile.h>
|
||||
#include <wx/log.h>
|
||||
|
@ -70,7 +71,12 @@ BOM_GENERATOR_HANDLER::BOM_GENERATOR_HANDLER( const wxString& aFile )
|
|||
m_file.GetPath(), m_file.GetFullName(),
|
||||
getOutputExtension( m_info ) );
|
||||
#else
|
||||
m_cmd = wxString::Format( "python \"%s\" \"%%I\" \"%%O%s\"", m_file.GetFullPath(),
|
||||
wxString interpreter = wxString::FromUTF8Unchecked( PYTHON_EXECUTABLE );
|
||||
|
||||
if( interpreter.IsEmpty() )
|
||||
interpreter = wxT( "python" );
|
||||
|
||||
m_cmd = wxString::Format( "%s \"%s\" \"%%I\" \"%%O%s\"", interpreter, m_file.GetFullPath(),
|
||||
getOutputExtension( m_info ) );
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue