You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tend to write / have a bunch of hybridized packages, C++ and python.
This might sound noob-ish, but I am not familiar with a better way to do this (combined); I've only ever used requirements.txt or poetry ❤️ . And for ros, all best practices go out the door, and everything is installed globally, the setup.cfg/py too complicated, so I've tried to avoid that. I just discovered this wonderful repo today, so I'm willing to convert!
My current solution has been adding python to cmake like the tutorial, then (as in doc) way at the bottom of the CMakeLists.txt, adding the following lines:
For dependency installation, each package has a requirements.txt, and I can install / update all my packages either with a rosdep -yr (silencing failures), then a find . -name "requirements.txt" -exec pip install -r {} \;, and then... deal with whatever remaining problems manually.
What "build" steps can be moved into the CMakeLists, and how does using poetry with this change environments?
What marginal work needs to be done in the pyproject.toml that's not in package.xml/CMakeLists.txt, and what is required, but yes is redundant?
The text was updated successfully, but these errors were encountered:
Thanks for bringing this up! C++/Python hybrid packages are a blind spot for me as I've never used them, so I could be wrong here, but I don't see a straightforward way for this extension to support this workflow.
When Colcon is building a package, each installed Colcon extension inspects the package and decides if it is the right extension for the job. For hybrid packages like yours, I believe the CMake Colcon extension is used and the ament_python_install_package function takes care of the Python side of things independent of Colcon. If this extension wanted to support hybrid packages, it would have to override the CMake extension, do all the things it normally does, and then hook in somewhere to install Python dependencies. That sounds hard to accomplish.
This might sound noob-ish, but I am not familiar with a better way to do this (combined)
Out of curiosity, what's to stop you from splitting your hybrid package into two "pure" packages? Could you tell me more about your requirements?
I tend to write / have a bunch of hybridized packages, C++ and python.
This might sound noob-ish, but I am not familiar with a better way to do this (combined); I've only ever used requirements.txt or poetry ❤️ . And for ros, all best practices go out the door, and everything is installed globally, the setup.cfg/py too complicated, so I've tried to avoid that. I just discovered this wonderful repo today, so I'm willing to convert!
My current solution has been adding python to cmake like the tutorial, then (as in doc) way at the bottom of the CMakeLists.txt, adding the following lines:
For dependency installation, each package has a requirements.txt, and I can install / update all my packages either with a rosdep -yr (silencing failures), then a
find . -name "requirements.txt" -exec pip install -r {} \;
, and then... deal with whatever remaining problems manually.What "build" steps can be moved into the CMakeLists, and how does using poetry with this change environments?
What marginal work needs to be done in the pyproject.toml that's not in package.xml/CMakeLists.txt, and what is required, but yes is redundant?
The text was updated successfully, but these errors were encountered: