PyMeshLab
PyMeshLab copied to clipboard
Support a system/external copy of meshlab?
Is there a path toward making it possible to build PyMeshLab with an external (system-wide) copy of MeshLab rather than using a bundled copy of the sources? This would be very helpful for packaging PyMeshLab in Linux distributions.
This issue has been automatically marked as stale because it has not had recent activity. The resources of the VCLab team are limited, and so we are asking for your help. If this is a bug and you can still reproduce this error on the last release of PyMeshLab, please reply with all of the information you have about it in order to keep the issue open. If this is a feature request, and you feel that it is still relevant and valuable, please tell us why. This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
Hi, sorry for the late reeply. I am not sure what you mean: are you suggesting to make the pip package of PyMeshLab that links the libraries that are part of the MeshLab package? That would complicate a lot the installation process of PyMeshLab under linux (see for example the gdal pip package that requires the gdal binaries with the same version of the pip package). Moreover, MeshLab and PyMeshLab are built with some different flags, and we do not maintain the main MeshLab linux packages outside the AppImage (see for example the apt package that is quite old and not updated...)
The suggestion was to add a CMake option that would allow building PyMeshLab linked against an external/system copy of MeshLab—not as the default, but as a tool for distribution packagers and others who are willing to deal with the consequences.
As a (Fedora) Linux distribution packager, I should use the system copies of libraries rather than bundled/vendored copies whenever possible. Using bundled libraries is permitted in Fedora under certain circumstances, but it’s not the first choice. Many distributions have similar policies.
When working on distribution packages, I can expect that everything is built with the same compiler and with similar compiler flags, and I can expect to be responsible for working out issues with version compatibility. This can be a little fussy sometimes, but the end result is that users can sudo dnf install python3-pymeshlab
without worrying about dependencies or compatibility.
Based on your comment, I did find
https://github.com/cnr-isti-vclab/PyMeshLab/blob/ff26b26e03ea981ca6ce7d42bcc5b6886a79cca8/src/CMakeLists.txt#L34-L35
which does seem like it would prevent us from using a system-wide copy of MeshLab built with the default single-precision scalars. So I am not sure there is a path forward with this unless we are willing to have a double-precision MeshLab package (only), or unless we are clever enough to devise a way to offer parallel-installable single- and double-precision copies of MeshLab in Fedora.