[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Recommended way of installing system-wide python application and libraries



As far as how to do this within an existing cmake project, unfortunately, there doesn't seem to be a clear/easy way.  The only cmake example I can think off of the top of my head is cvc5.  It still uses setup.py though, so not a great future-looking example (and I had to patch it to build the Python bindings in Debian): https://github.com/cvc5/cvc5/blob/main/src/api/python/CMakeLists.txt

We've been using cmake + pybuild very successfully for packaging the various Cura components:

https://salsa.debian.org/3dprinting-team/cura/-/blob/master/debian/rules
https://salsa.debian.org/3dprinting-team/cura-engine/-/blob/master/debian/rules
https://salsa.debian.org/3dprinting-team/uranium/-/blob/master/debian/rules
etc.

Cura is a mix of Python and C++, so a pure Python tools approach wouldn't have worked well. Upstream used cmake exclusively in the past, and that worked very well together with pybuild. Unfortunately, they recently introduced a new build environment based on conan, which is why we haven't managed to package new Cura versions yet.

The best solution right now is probably: https://scikit-build-core.readthedocs.io
It's specifically designed for combining CMake + Python.
I don't know how well this is supported in Debian so far.


Reply to: