46 lines
2.2 KiB
Diff
46 lines
2.2 KiB
Diff
Index: gmsh-4.9.0-source/CMakeLists.txt
|
|
===================================================================
|
|
--- gmsh-4.9.0-source.orig/CMakeLists.txt
|
|
+++ gmsh-4.9.0-source/CMakeLists.txt
|
|
@@ -1870,6 +1870,8 @@ else()
|
|
set(GMSH_INC ${CMAKE_INSTALL_INCLUDEDIR})
|
|
endif()
|
|
|
|
+execute_process ( COMMAND python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())" OUTPUT_VARIABLE PYTHON3_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
+
|
|
# mark targets as optional so we can install them separately if needed
|
|
# (e.g. "make lib" or "make shared" followed by "make install/fast")
|
|
install(TARGETS gmsh DESTINATION ${GMSH_BIN} OPTIONAL)
|
|
@@ -1881,11 +1883,11 @@ if(ENABLE_BUILD_SHARED OR ENABLE_BUILD_D
|
|
endif()
|
|
|
|
if(ENABLE_ONELAB AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/onelab)
|
|
- install(FILES ${ONELAB_PY} DESTINATION ${GMSH_BIN})
|
|
+ install(FILES ${ONELAB_PY} DESTINATION ${PYTHON3_SITE_PACKAGES})
|
|
endif()
|
|
if(ENABLE_BUILD_LIB OR ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC)
|
|
install(FILES ${GMSH_API} DESTINATION ${GMSH_INC})
|
|
- install(FILES ${GMSH_PY} DESTINATION ${GMSH_LIB})
|
|
+ install(FILES ${GMSH_PY} DESTINATION ${PYTHON3_SITE_PACKAGES})
|
|
install(FILES ${GMSH_JL} DESTINATION ${GMSH_LIB})
|
|
if(ENABLE_PRIVATE_API)
|
|
install(FILES ${GMSH_PRIVATE_API} DESTINATION ${GMSH_INC}/gmsh)
|
|
Index: gmsh-4.9.0-source/Common/GmshMessage.cpp
|
|
===================================================================
|
|
--- gmsh-4.9.0-source.orig/Common/GmshMessage.cpp
|
|
+++ gmsh-4.9.0-source/Common/GmshMessage.cpp
|
|
@@ -171,14 +171,6 @@ void Msg::Initialize(int argc, char **ar
|
|
if(CTX::instance()->exeFileName.empty() && _commandLineArgs.size())
|
|
CTX::instance()->exeFileName = _commandLineArgs[0];
|
|
|
|
- if(_env) {
|
|
- // add the directory where the binary is installed to the path where Python
|
|
- // looks for modules, and to the path for executables (this allows us to
|
|
- // find the onelab.py module or subclients automatically)
|
|
- addGmshPathToEnvironmentVar("PYTHONPATH");
|
|
- addGmshPathToEnvironmentVar("PATH");
|
|
- }
|
|
-
|
|
if(_locale) {
|
|
// make sure to use the "C" locale; in particular this ensures that we will
|
|
// use a dot for for the decimal separator when writing ASCII mesh files
|