This is especially useful for, e.g. ros2 launch files that need to reside in share/<package_name>. Currently, if you have
....
data_files=[
('share/' + package_name, ['package.xml', 'my.launch.py']),
],
....
Then package.xml gets symlinked but the launch files do not:
package.bash
package.ps1
package.sh
my.launch.py
package.xml -> /my_workspace/src/my_package/package.xml
package.zsh
Symlink install handling is in colcon_core/task/python/__init__.py. @dirk-thomas mentioned that pulling the information from setup.py to unwind the install and replace with symlinks is difficult and potentially unreliable (depending on whatever other programmatic mischief is going on in setup.py) and a better place to define the information is in setup.cfg.
options.data_files is not supported in setuptools on bionic though (v39.0.1). Seems the version necessary may be v40.5.0 (setuptools issue 1522) and may have issues with dashes.
This is especially useful for, e.g. ros2 launch files that need to reside in
share/<package_name>. Currently, if you haveThen
package.xmlgets 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.pyto 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_filesis 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.