Sorry, I should have said something before.
There is already a mechanism in GMSH to install the Python module in the proper place (the setup files are here) through the pip package installer.
This setup.py
script is quite complex and handles the installation of GMSH in Linux, Windows and macOS, but it is intended to be used from pip (it downloads and installs the proper versions of GMSH) so it must not be used if you are compiling and installing GMSH from source.
I think the best solution is to write a variant of this setup script that can be used when installing GMSH with CMake. Unfortunately, I don't feel very comfortable modifying the code that deals with installation on Windows and macOS, so I have not touched anything. I don't know if the guy which wrote the script (Marek Wojciechowski) would be able to help with this.
Ah. OK, thank you!
Hi, Christophe.
Yeah, it's not very fanny to deal with all those little details that prevent us to allow things running after a huge amount of work.
I'm trying to create a fork of gmsh because I thought that's the standard way to make modifications to the repository, but your GitLab server says that I have reached my project limit (which must be zero because I have no other projects there). Must I use a Git development branch instead?
Cheers.
Hi there.
I've installed Gmsh from sources using CMake, and it works perfectly fine except in regard to the Python module. The files gmsh.py
is copied into the /usr/local/lib/
folder (I'm using Ubuntu 20.04) instead of being installed in the corresponding /usr/local/lib/pythonX.Y/dist-packages/
directory. I've taken a look at the CMakeLists.txt
file and apparently CMake is simply doing what it is instructed to do.
I have some experience writing Python scripts which install Python modules from source code. If that's OK with you, I can prepare a pull request with a similar solution for Gmsh.
Thanks for your great work.