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

When finding Python3, use python3 executable as a hint #650

Merged
merged 2 commits into from Feb 16, 2024

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Feb 15, 2024

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.

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status
  • Windows-debug Build Status <- did I trigger this wrong? Is it even expected to work?

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>
@cottsay cottsay added the bug Something isn't working label Feb 15, 2024
@cottsay cottsay self-assigned this Feb 15, 2024
Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with green CI

@clalancette
Copy link
Contributor

  • Windows-debug Build Status <- did I trigger this wrong? Is it even expected to work?

So at the very least, the "packaging" variant of Windows Debug needs to work so we can release the tarball. That job failed because of building a test, which the "packaging" variant may skip.

Regardless, we can probably fix that particular problem by splitting that test into smaller chunks, or add the /bigobj flag when building rosbag2_transport on Windows Debug.

@clalancette
Copy link
Contributor

By the way, I'm 100% behind doing this, after we fix the above problem.

One thing I will say that we are in a somewhat strange procedural place. That is, usually we target fixes at rolling, and then backport from there. In this particular case, I don't think we should do that because I have a more comprehensive fix for this exact problem in the works for rolling. I think that is the better long-term fix, but it will not be possible to backport to humble because it raises the minimum CMake version to 3.20. I haven't yet opened the PRs for this (it will take a number of them), but I am planning on doing that in the next few days.

@cottsay cottsay merged commit a3db20f into humble Feb 16, 2024
2 checks passed
@delete-merged-branch delete-merged-branch bot deleted the cottsay/find_python3 branch February 16, 2024 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants