Skip to content

Conversation

@scpeters
Copy link
Member

🦟 Bug fix

Fixes hidden warnings when python development libraries are not found, port of gazebosim/gz-transport#565

Summary

The value of Python3_Development_FOUND may change if other code paths call find_package(Python3), so move the warning to be co-located with the add_subdirectory call. Otherwise python bindings may be silently ignored.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

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.

The value of this variable may change if other code paths
call find_package(Python3), so move the warning to be
co-located with the add_subdirectory call.

Signed-off-by: Steve Peters <[email protected]>
@github-actions github-actions bot added 🏛️ ionic Gazebo Ionic 🪵 jetty Gazebo Jetty labels Feb 10, 2025
@codecov
Copy link

codecov bot commented Feb 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.73%. Comparing base (44e3bba) to head (20867be).
Report is 10 commits behind head on gz-math8.

Additional details and impacted files
@@             Coverage Diff              @@
##           gz-math8     #662      +/-   ##
============================================
+ Coverage     95.71%   95.73%   +0.01%     
============================================
  Files           150      151       +1     
  Lines         10390    10429      +39     
============================================
+ Hits           9945     9984      +39     
  Misses          445      445              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -20,6 +20,8 @@ add_subdirectory(graph)
# Bindings subdirectories
if (Python3_Development_FOUND AND NOT SKIP_PYBIND11)
Copy link
Member Author

Choose a reason for hiding this comment

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

I should nest this logic like is done in gazebosim/gz-transport#565

Copy link
Member Author

Choose a reason for hiding this comment

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

@scpeters scpeters requested a review from azeey February 11, 2025 00:43
@scpeters scpeters merged commit 62957f7 into gz-math8 Feb 12, 2025
17 checks passed
@scpeters scpeters deleted the scpeters/unhide_find_python_cmake_warning branch February 12, 2025 19:28
@scpeters scpeters mentioned this pull request Feb 12, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏛️ ionic Gazebo Ionic 🪵 jetty Gazebo Jetty

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants