Skip to content

Commit

Permalink
Fixup install_scripts_stuff on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias-Fischer authored Feb 4, 2023
1 parent a1e74dc commit 4925dde
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions vinca/templates/build_ament_python.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4925dde

Please sign in to comment.