Ultimaker / libArcus

Communication library between internal components for Ultimaker software

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove the Debian hack from CMakeLists.txt

onitake opened this issue · comments

This issue applies to all Cura repositories. I'd like to discuss it here first, because it's most important for the SIP modules.

The Debian project has recently started to migrate to Python 3.7. In the course of this, it was discovered that the build scripts for libArcus, libSavitar et al were not capable of producing modules for all installed Python versions on the system. During the upgrade phase, both Python 3.6 and 3.7 will be available and all Python packages should build against both.
Part of the reason is the "Debian hack" in CMakeLists.txt#L29-L32.

However, we also discovered something else that will solve both problems at once:
If the Debian packages are built with pybuild instead of cmake directly, pybuild will take care of renaming and moving the modules to the "correct" location in Debian systems. Plus, it will run the build process once for each installed Python version - producing modules for all of them!

This is our fix: https://salsa.debian.org/3dprinting-team/libarcus/commit/5a9f763e18c4ada320f99d06bf32d6b770473220

And here's just the CMakeLists.txt patch: https://salsa.debian.org/3dprinting-team/libarcus/blob/master/debian/patches/02-add-python-version.patch

I can submit a PR for libArcus and all other Cura repositories if this is useful to you. We will keep the patch in the Debian build repos otherwise.

I should also note that the packages in Ubuntu are based on the Debian ones and while I can't test cross-building right now, I'm quite certain they will build and work fine with this change. I'll discuss it with the Ubuntu maintainer.

Hi @onitake,
Sorry it took so long to get back. We've decided that we'd like to have the PR. It might take us a while to get to it (we've got a bit of a backlog), but at least it will be in the pipeline then.
kind regards, Remco.

All right!
As soon as I've updated all Debian packages with the patch and tested them, I'll submit a PR for each Repo.

Btw. removing the hack is included here: #90
Haven't seen @onitake 's changes, but that's the most recent way to determine the site-packages path.
CMake introduced since 3.12 release.

I think since we need the most recent software like Qt, then we can also depend on more recent build tools, too. However, only my opinion of course.

Should be fixed with #94 .