-
Notifications
You must be signed in to change notification settings - Fork 31
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
Deprecate GzPython.cmake #431
Conversation
It's better to call find_package(Python3) directly so the user has better control over which COMPONENTS are requested. Signed-off-by: Steve Peters <[email protected]>
Update GzBuildTests.cmake and GzCodeCheck.cmake to stop using GzPython. Signed-off-by: Steve Peters <[email protected]>
set(Python3_EXECUTABLE ${PYTHON_EXECUTABLE}) | ||
endif() | ||
endif() | ||
find_package(Python3 ${GZ_PYTHON_VERSION} QUIET) | ||
|
||
# Tick-tock PYTHON_EXECUTABLE until Python3_EXECUTABLE is released | ||
# TODO(jrivero) gz-cmake4: start the deprecation cycle of PYTHON_EXECUTABLE |
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.
I just noticed some uses of PYTHON_EXECUTABLE
; I'll clean those up before merging this
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.
primarily here: https://github.com/gazebosim/gz-sim/blob/main/python/CMakeLists.txt#L12
that's old cmake code that will be removed as part of #350, so actually it shouldn't be a problem
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 will be removed in gazebosim/gz-sim#2420
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.
that has been merged, so I'll merge this as well
🎉 New feature
Part of #350
Summary
Using
GzPython.cmake
to find python is not ideal since it's best to find python once with the components that you need. Now thatfind_package(Python3)
works well, it's best to just use that.All Gazebo packages in Ionic have stopped using
GzPython
, so this should be safe to merge.Test it
Compile Gazebo Ionic from source against this branch and ensure there are no cmake warnings from using GzPython and that python bindings are properly built for each package.
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.