Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use proper python module destination#170

Open
ghostshadow wants to merge 1 commit intoaewallin:masterfrom
ghostshadow:fix/python-install-path
Open

Use proper python module destination#170
ghostshadow wants to merge 1 commit intoaewallin:masterfrom
ghostshadow:fix/python-install-path

Conversation

@ghostshadow
Copy link

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 and Python3_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 🥲

@aewallin
Copy link
Owner

aewallin commented Feb 3, 2025

any idea why the CI builds/tests all fail? something changed on github side?

@vespakoen
Copy link
Collaborator

I am fine with using Python3_SITEARCH.

Looks like boost download link changed causing the builds to break, I will update it to a newer one and see what happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants