-
Notifications
You must be signed in to change notification settings - Fork 173
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
Support ament_cmake_python
for pkg create
#904
Conversation
Signed-off-by: m12watanabe1a <[email protected]>
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.
As far as I can see, there is no package type called ament_cmake_python
. For all of our python packages that are built using CMake, the package.xml type is just ament_cmake
(one example)
@m12watanabe1a Can you explain more about what you are trying to accomplish here?
@clalancette Thank you for reviewing. I tired to newly support for
|
Signed-off-by: m12watanabe1a <[email protected]>
ros2pkg/ros2pkg/api/create.py
Outdated
@@ -112,6 +112,10 @@ def create_package_environment(package, destination_directory): | |||
if package.get_build_type() == 'ament_python': | |||
print('creating source folder') | |||
source_directory = _create_folder(package.name, package_directory) | |||
if package.get_build_type() == 'ament_cmake_python': |
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.
There are currently no instances of ROS 2 packages where this would be true. That is, package.get_build_type()
will never return ament_cmake_python
.
That said, it would still be worthwhile to have some way to create a package template for a Python package using CMake. However, it will have to be done a different way because it will use a build_type
of ament_cmake
. Maybe we can add in a new command-line argument that tells it to generate Python installation stuff in the CMakeLists.txt?
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.
Maybe we can add in a new command-line argument that tells it to generate Python installation stuff in the CMakeLists.txt?
I see. I agree with that build_type
is not appropriate field for generating templates.
So maybe something like like,
ros2 pkg create --build-type ament_cmake --template-name ament_cmake_python <package_name>
Signed-off-by: m12watanabe1a <[email protected]>
I added an agenda item to the next ROS 2 meeting to get feedback on the naming of Thank you for your patience! |
Thank you so much 🙏 |
About this PR
--template-name
for selecting different templateament_cmake_python
Related Issue
#739
How to use
This command will genrate,
Both
<node_name>
or<library_name>
given in the cli will generate node or library in cpp.