diff -rupN gmsh-4.1.0-source/CMakeLists.txt gmsh-4.1.0-source-new/CMakeLists.txt --- gmsh-4.1.0-source/CMakeLists.txt 2019-01-14 23:36:00.032389832 +0100 +++ gmsh-4.1.0-source-new/CMakeLists.txt 2019-01-14 23:36:00.201390130 +0100 @@ -1773,6 +1773,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) + # FIXME: change this once we understand rpaths if(APPLE) if(ENABLE_BUILD_DYNAMIC OR ENABLE_BUILD_SHARED) @@ -1794,11 +1796,11 @@ if(ENABLE_BUILD_SHARED OR ENABLE_BUILD_D endif() if(ENABLE_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) diff -rupN gmsh-4.1.0-source/Common/GmshMessage.cpp gmsh-4.1.0-source-new/Common/GmshMessage.cpp --- gmsh-4.1.0-source/Common/GmshMessage.cpp 2019-01-08 22:41:13.000000000 +0100 +++ gmsh-4.1.0-source-new/Common/GmshMessage.cpp 2019-01-14 23:36:00.202390131 +0100 @@ -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"); }