add ament_cmake_python build type to ros2 pkg create#1233
Closed
darshmenon wants to merge 1 commit into
Closed
Conversation
Collaborator
fujitatomoya
left a comment
There was a problem hiding this comment.
can you use our PR template to fill in? did you use any AI tools like Claude/Copilot, that needs to be disclosed, it looks like pretty much AI generated report is pated in the PR header.
and DCO is missing.
btw this replaces #1080?
4 tasks
Member
|
There's a PR for this already: #1080 |
Member
In this case, reviews of that PR are certainly welcome. Anyone can review a PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #739
Adds
ament_cmake_pythonas a valid--build-typeoption forros2 pkg create, enabling users to scaffold a hybrid C++/Python package without having to manually write boilerplate.What changes
verb/create.pyament_cmake_pythonto the--build-typechoicesbuildtool_dependsto['ament_cmake', 'ament_cmake_python']ament_cmaketest dependencies (lint tooling)build_typeasament_cmakeinpackage.xml(correct — colcon treats it as a CMake package)populate_ament_cmake_pythonand creates ascripts/node when--node-nameis givenapi/create.pypopulate_ament_cmake_python— generatesCMakeLists.txtand seeds the Python package directory with__init__.pyandpy.typedcreate_package_environmentto create the Python package source folder forament_cmake_pythonresource/ament_cmake_python/CMakeLists.txt.emfind_package(ament_cmake_python),ament_python_install_package(${PROJECT_NAME}), and optionally installs a node scriptUsage
Generates a package with:
CMakeLists.txtusingament_cmake_pythonmy_pkg/__init__.pyPython packagescripts/my_nodeexecutable nodepackage.xmlwith bothament_cmakeandament_cmake_pythonbuildtool deps