-
Notifications
You must be signed in to change notification settings - Fork 44
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
Find Python3 directly, not with GzPython #472
Conversation
This removes the use of gz-cmake's GzPython in favor of a single call to find_package(Python3). This allows setting Python3_EXECUTABLE to specify which python version to use and is needed on macOS. Signed-off-by: Steve Peters <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## gz-transport13 #472 +/- ##
==================================================
+ Coverage 87.80% 87.94% +0.14%
==================================================
Files 59 59
Lines 5699 5974 +275
==================================================
+ Hits 5004 5254 +250
- Misses 695 720 +25 ☔ View full report in Codecov by Sentry. |
windows failed to find python development, as its search for |
@@ -22,7 +22,6 @@ option(SKIP_PYBIND11 | |||
|
|||
# Python interfaces vars | |||
include(CMakeDependentOption) | |||
include(GzPython) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, removing this is probably why windows failed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's fixed as of 505537f
Signed-off-by: Steve Peters <[email protected]>
Signed-off-by: Steve Peters <[email protected]>
I believe this find logic is fixed as of 505537f I used
|
This removes the use of gz-cmake's GzPython in favor of a single call to find_package(Python3). This allows setting Python3_EXECUTABLE to specify which python version to use and is needed on macOS. Signed-off-by: Steve Peters <[email protected]>
This removes the use of gz-cmake's GzPython in favor of a single call to find_package(Python3). This allows setting Python3_EXECUTABLE to specify which python version to use and is needed on macOS. Signed-off-by: Steve Peters <[email protected]>
🦟 Bug fix
Motivated by gazebosim/gz-sim#2249.
Summary
While testing the use of
-DPython3_EXECUTABLE=$(which python3)
to aid in finding the right version of python3 on macOS (see osrf/homebrew-simulation#2543), I ran into some cmake configuration issues when testing locally (the bottle build seems to be progressing fine though). I was able to fix my local build by consolidating the logic for finding python3 by removing the use of gz-cmake'sGzPython
in favor of a single call tofind_package(Python3)
. This fixes settingPython3_EXECUTABLE
to specify which python version to use and is needed on macOS.As an aside, I'm going to suggest that we deprecate
GzPython
onmain
since it's better and simpler to just find python directly with modern versions of cmake.Check the diff without whitespace to see a simpler version of the changes without the indentation.
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.