Blob Blame History Raw
diff -rupN gmsh-4.0.0-source/CMakeLists.txt gmsh-4.0.0-source-new/CMakeLists.txt
--- gmsh-4.0.0-source/CMakeLists.txt	2018-08-23 11:57:38.816721896 +0200
+++ gmsh-4.0.0-source-new/CMakeLists.txt	2018-08-23 11:57:38.952721889 +0200
@@ -1769,7 +1769,8 @@ if(ENABLE_BUILD_SHARED OR ENABLE_BUILD_D
 endif(ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC)
 
 if(ENABLE_ONELAB)
-  install(FILES ${ONELAB_PY} DESTINATION ${GMSH_BIN})
+  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)
+  install(FILES ${ONELAB_PY} DESTINATION ${PYTHON3_SITE_PACKAGES})
 endif(ENABLE_ONELAB)
 if(ENABLE_BUILD_LIB OR ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC)
   install(FILES ${GMSH_API} DESTINATION ${GMSH_INC})
diff -rupN gmsh-4.0.0-source/Common/GmshMessage.cpp gmsh-4.0.0-source-new/Common/GmshMessage.cpp
--- gmsh-4.0.0-source/Common/GmshMessage.cpp	2018-06-27 22:44:49.000000000 +0200
+++ gmsh-4.0.0-source-new/Common/GmshMessage.cpp	2018-08-23 11:57:38.953721888 +0200
@@ -154,12 +154,6 @@ void Msg::Init(int argc, char **argv)
   if(CTX::instance()->exeFileName.empty() && argc && argv)
     CTX::instance()->exeFileName = argv[0];
 
-  // 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");
-
   InitializeOnelab("Gmsh");
 }