New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't break Python install path detection on Debian #229
Conversation
If we're using the fallback path detection method on Debian, we shouldn't compute the install path relative to `${CMAKE_INSTALL_PREFIX}` since it _isn't_. So, we assume it's relative to `/usr/local` instead.
I don't understand why it is so complicated? Can't we just use FIND_PACKAGE(Python 3)? |
That wouldn't give us the module install path. We can't use (The thing we are using, because it existed before CMake 3.12, is Really, it's only complicated because the Debian Python people are on crack. |
(TL;DR version of the linked comment:) Debian-derived distros follow the Debian Python Policy which says that:
...But then their own |
Thanks @ferdnyc! This looks all sorts of crazy (not blaming you, haha). But I'm feeling crazy, so let's give it a try. Hopefully one day someone will stop by and say, you guys are nuts, just use this 1 line solution, lol! 👍 |
Darn, all builders failed initially. Looks like Linux did work okay, with a minor tweak to the gitlab-ci.yml file (just a path changing), but Mac and Windows failed in a stranger way. Might be related to Cmake version, not sure. Details are included in #260. |
Maybe we just go with the most "standard / simplest" approach, and let Debian patch things if they want to hard-code it, or use a different method? I can always make things work with respect to the builders... and distros can (and usually do) patch the Python install path. |
I hate this change. Or it hates me, not even sure which. All I know is that the current bindings install-path logic is completely broken. The Python logic tries too hard to be too clever, and turns into a mess. Whereas the the Ruby bindings aren't nearly clever enough — if you build with a relative I really want to fix that, still, but I feel like there are too many moving parts too far out of my reach to figure out how. |
OK, this adds in this fix with the #222 changes, which should protect against #227
Python: Assume /usr/local prefix on Debian
If we're using the fallback path detection method on Debian, we
shouldn't compute the install path relative to
${CMAKE_INSTALL_PREFIX}
since it isn't. So, we assume it's relative to
/usr/local
instead.