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

python bindings: get version from package.xml #1504

Open
wants to merge 3 commits into
base: sdf15
Choose a base branch
from

Conversation

scpeters
Copy link
Member

🎉 New feature

Similar to gazebosim/gz-math#642 using gazebosim/gz-cmake#456 from gz-cmake 4.1.0

Summary

When building python bindings separately from the main library, the major version of libsdformat has been hard-coded, but this changes it to parse the version number from the package.xml file in this repository using a gz-cmake feature added in gazebosim/gz-cmake#456 and released in 4.1.0. We could also consider using this feature in the root CMakeLists.txt file, but for now it is just used when building python bindings separately from the main library.

Test it

  1. Configure the python folder:
cd python
mkdir build
cd build
cmake ..
  1. Verify that it found sdformat15
-- Looking for sdformat15 -- found version 15.0.0

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • 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.

Requires gz-cmake4 4.1.0.

Signed-off-by: Steve Peters <[email protected]>
@scpeters scpeters requested a review from azeey as a code owner November 14, 2024 18:27
@github-actions github-actions bot added 🏛️ ionic Gazebo Ionic 🪵 jetty Gazebo Jetty labels Nov 14, 2024
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (sdf15@4ebe022). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff            @@
##             sdf15    #1504   +/-   ##
========================================
  Coverage         ?   92.47%           
========================================
  Files            ?      138           
  Lines            ?    18326           
  Branches         ?        0           
========================================
  Hits             ?    16947           
  Misses           ?     1379           
  Partials         ?        0           

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


🚨 Try these New Features:

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: Inbox
Development

Successfully merging this pull request may close these issues.

1 participant