Skip to content

fix gmsh.pth on ubuntu

Jonathan Lambrechts requested to merge fixGmshPthUbuntu into master

For some unknown reason, distutils.sysconfig.get_python_lib(), does not return the expected result on ubuntu: lib/python3/site-packages instead of lib/python3.8/site-packages (see for example https://ubuntuforums.org/showthread.php?t=2411807). As a result, gmsh.pth is not installed at the right location and the gmsh install path is not added to automatically to PYTHONPATH. This patch set manually the path of the gmsh.pth file according to python documentation : https://docs.python.org/3/library/site.html, i.e. lib/site-packages on windows and lib/pythonX.X/site-packages on linux/OSX.

This change will probably becomes irrelevant if the branch "python_packaging" of @akaszynski is merged but in the meantime, it simplifies the usage of the pip package.

Merge request reports