Fix the install location for vcpkg built python modules
This commit is contained in:
parent
318d7ab67b
commit
84dd78e01d
|
@ -767,17 +767,21 @@ if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES )
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if( NOT APPLE )
|
||||
set( PYTHON_DEST "${PYTHON_SITE_PACKAGE_PATH}"
|
||||
CACHE PATH "Python module install path."
|
||||
)
|
||||
else()
|
||||
if( APPLE )
|
||||
# relative path for python in bundle
|
||||
set( PYTHON_LIB_DIR "python/site-packages" )
|
||||
# install into bundle Frameworks folder
|
||||
set( PYTHON_DEST "${OSX_BUNDLE_BUILD_LIB_DIR}/${PYTHON_LIB_DIR}"
|
||||
CACHE PATH "Python module install path."
|
||||
)
|
||||
elseif( VCPKG_TOOLCHAIN )
|
||||
set( PYTHON_DEST "${CMAKE_INSTALL_PREFIX}/lib/python3/Lib/site-packages"
|
||||
CACHE PATH "Python module install path."
|
||||
)
|
||||
else()
|
||||
set( PYTHON_DEST "${PYTHON_SITE_PACKAGE_PATH}"
|
||||
CACHE PATH "Python module install path."
|
||||
)
|
||||
endif()
|
||||
mark_as_advanced( PYTHON_DEST )
|
||||
message( STATUS "Python module install path: ${PYTHON_DEST}" )
|
||||
|
|
|
@ -215,7 +215,7 @@ PGM_BASE* PgmOrNull()
|
|||
static bool scriptingSetup()
|
||||
{
|
||||
|
||||
#if defined( __WINDOWS__ )
|
||||
#if defined( __WINDOWS__ ) && !defined( _MSC_VER )
|
||||
// If our python.exe (in kicad/bin) exists, force our kicad python environment
|
||||
wxString kipython = FindKicadFile( "python.exe" );
|
||||
|
||||
|
|
|
@ -165,12 +165,12 @@ bool pcbnewInitPythonScripting( const char * aUserScriptingPath )
|
|||
// Under vcpkg/msvc, we need to explicitly set the python home
|
||||
// or else it'll start consuming system python registry keys and the like instead
|
||||
// We are going to follow the "unix" layout for the msvc/vcpkg distributions so exes in /root/bin
|
||||
// And the python lib in /root/share/python3(/Lib,/DLLs)
|
||||
// And the python lib in /root/lib/python3(/Lib,/DLLs)
|
||||
wxFileName pyHome;
|
||||
|
||||
pyHome.Assign( Pgm().GetExecutablePath() );
|
||||
pyHome.AppendDir( wxT("..") );
|
||||
pyHome.AppendDir( wxT("share") );
|
||||
pyHome.AppendDir( wxT("lib") );
|
||||
pyHome.AppendDir( wxT("python3") );
|
||||
|
||||
pyHome.Normalize();
|
||||
|
|
Loading…
Reference in New Issue