Use proper python module destination #170
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since the maintainer of the AUR package (https://aur.archlinux.org/packages/opencamlib-git) appears to have difficulties keeping up with patching the python module install path (my install was broken again), I thought it should actually be fixed upstream.
I also noted the issue of the Debian package maintainer (#157 ) and this should improve the situation there as well.
The "FindPython3" CMake module already provides variables containing the paths for installing modules into (https://cmake.org/cmake/help/latest/module/FindPython3.html,
Python3_SITELIB
andPython3_SITEARCH
), so why not use these directly? This way it should be a lot more portable and not require the execute_process.Note: Since
site.getsitepackages()
only contains one element on my system, the index[-2]
is out of bounds resulting in an exception. This caused the python module being installed to/opencamlib
, which, I think, is even worse than/usr/lib/opencamlib
, as it was in the version before 🥲