-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Symlink install of data_files for python setuptools packages #169
Comments
|
Okay, I understand now. Python's setup tools generally install the files specified in |
Since newer versions of |
Do you happen to have a link to some more information @dirk-thomas? I'm not having much luck discovering anything on google. |
Just for reference for others, I've been working around this problem with launch files by putting implementations of the launch methods in the package modules (which indirectly get symlink installed) and simply making a one line call out to it from the launch script. Since the one line call out rarely changes, it just needs the one install. |
I think this issue should not have been closed, it has not been resolved. Maybe @dirk-thomas misread the original issue as basic |
We can reopen, but nothing has really changed here. The underlying build system (setuptools) still does not support this (here's the spot). I'm not able to find any evidence that there is a supported mechanism to do this even in newer versions of setuptools, which was referenced as the reason it was closed to begin with. |
Hmm, is there any way we could clearly note the limitation (like, notice I think the part that's most confusing to a user is the disparity between CMake and setuptools. Since in ROS 1 we only had catkin cmake, so there wasn't the possibility for a difference. It is inevitable that, by supporting totally different build tools via colcon, we invite differences in behavior between them. But, symlinked launchfiles feel like one of those really basic development loops that will have been ingrained into any longtime ROS user. That's my argument for keeping this open as a bug, even if I don't have an answer for how to solve it. |
I've opened a draft PR (#592) which might be a possible solution here. It digs into setuptools a little more than I'd like it to, but it seems to function how we want it to. Please take a look and provide feedback if it works for you. |
This is especially useful for, e.g. ros2 launch files that need to reside in
share/<package_name>
. Currently, if you haveThen
package.xml
gets symlinked but the launch files do not:Symlink install handling is in
colcon_core/task/python/__init__.py
. @dirk-thomas mentioned that pulling the information fromsetup.py
to unwind the install and replace with symlinks is difficult and potentially unreliable (depending on whatever other programmatic mischief is going on insetup.py
) and a better place to define the information is insetup.cfg
.options.data_files
is not supported in setuptools on bionic though (v39.0.1
). Seems the version necessary may bev40.5.0
(setuptools issue 1522) and may have issues with dashes.The text was updated successfully, but these errors were encountered: