Skip to content
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

[Backport]When finding Python3, use python3 executable as a hint (#507) #547

Closed
wants to merge 1 commit into from

Conversation

roscan-tech
Copy link

The existing find_package(Python3) call will locate the Python interpreter with the latest version number. However, this may not be the system's default Python interpreter for which our dependencies have been installed.

If Python3_EXECUTABLE is not explicitly specified, use find_program to locate the Python interpreter behind the "python3" command, which is likely the system's default and the one that we want.

If no executable can be found by the name "python3", the find_program call will silently fail and the existing behavior will manifest.

The existing find_package(Python3) call will locate the Python
interpreter with the latest version number. However, this may not be the
system's default Python interpreter for which our dependencies have been
installed.

If Python3_EXECUTABLE is not explicitly specified, use find_program to
locate the Python interpreter behind the "python3" command, which is
likely the system's default and the one that we want.

If no executable can be found by the name "python3", the find_program
call will silently fail and the existing behavior will manifest.

Signed-off-by: Scott K Logan <logans@cottsay.net>
@clalancette
Copy link
Contributor

I'm not 100% certain of this, but I think we would also need ros2/geometry2#650 forward-ported to iron.

@kpochwala
Copy link

kpochwala commented Sep 18, 2024

What could be the possible scenario, when cmakes FindPython3 would not find system wide installed interpreter?

If I understand this correctly, it would break in virtual environments.

@clalancette
Copy link
Contributor

While we appreciate this PR, this late in the lifecycle of Iron it seems a bit dangerous. Given that, I'm going to close this out.

@clalancette clalancette closed this Nov 5, 2024
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.

4 participants