diff --git a/vinca/templates/build_ament_python.sh.in b/vinca/templates/build_ament_python.sh.in index 8fc5127..24d2dfd 100644 --- a/vinca/templates/build_ament_python.sh.in +++ b/vinca/templates/build_ament_python.sh.in @@ -8,11 +8,12 @@ grep -q "install[-_]scripts" setup.cfg if [ $? -eq 0 ]; then INSTALL_SCRIPTS_ARG="" else - # this is not quite what we want as PKG_NAME contains ros-humble- .. - # INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME" - # therefore for now throw an error as packages should have a setup.cfg - echo "This package is missing a setup.cfg, stopping." - exit 1 + # Remove e.g. ros-humble- from PKG_NAME + PKG_NAME_SHORT=${PKG_NAME#*ros-@(ros_distro)-} + # Substitute "-" with "_" + PKG_NAME_SHORT=${PKG_NAME_SHORT//-/_} + INSTALL_SCRIPTS_ARG="--install-scripts=$PREFIX/lib/$PKG_NAME_SHORT" + echo "WARNING: setup.cfg not set, will set INSTALL_SCRIPTS_ARG to: $INSTALL_SCRIPTS_ARG" fi # Old: This installs the binaries in the wrong location - see https://github.com/RoboStack/ros-humble/issues/41