Skip to content

WIP : binary python wheels

Jonathan Lambrechts requested to merge binary_python_wheels into master

This is a tentative to change the python pip package in two way:

  • upload more standard binary packages directly to pypi instead of a script that will generate the packages on the user's machine. This provide several advantages: 1) more reliable 2)faster installation 3) pip packages can have official versions numbers which allows other python libraries that depends on gmsh to request a specific (or minimal) version.
  • install the library and python bindings files in standard locations instead of relying on the "gmsh.pth" file which has not proven to be reliable (esp. on debian based distributions). As a bonus gmsh(.exe) and libgmsh should be available without PATH/LD_LIBRARY_PATH, ... modifications.

This is not ready to be merged but I open the merge request in the hope you can test and review it.

Notes :

  • Currently the generated packages are uploaded on test.pypi.org instead of pypi.org. They can be installed with: python3 -m pip install --index-url https://test.pypi.org/simple/ gmsh
  • Before merging, the three xxx_wheel_tmp jobs in the .gitlab_ci.yml file should be removed and the artifacts creation should be moved to the corresponding official jobs.
  • This only aims at replacing the "gmsh" packages. Uploading too many binary "gmsh-dev" packages to pypi is probably not allowed. For gmsh-dev packages, either the current approach could be maintained or they could be uploaded to a server that you control without size restrictions. In the later case, the installation of the gmsh-dev packages would simply requires to pass a "--index-url" option to the pip command.
  • The -nox linux library is not included for now.
  • The linux package pretends to be "manylinux1" compatible which is not true (mainly due to the x11 libraries dep).
  • I did not had the opportunity to test the windows package, the linux package does not work due to an OpenMP preload problem (which is not related to this branch, the master dev linux package does not work neither) but except for that the installation seems ok, I could only tried the osX package on a very old osX computer and I got an error I do not understand.

Merge request reports