Skip to content

Commit

Permalink
Merge pull request #49 from RoboStack/traversaro-patch-1
Browse files Browse the repository at this point in the history
Fix logic in build_ament_python.sh.in to detect setup.cfg
  • Loading branch information
Tobias-Fischer authored Feb 7, 2024
2 parents 681bbfd + b717019 commit 8fb224f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vinca/templates/build_ament_python.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ pushd $SRC_DIR/$PKG_NAME/src/work

# If there is a setup.cfg that contains install-scripts then we should not set it here
if [ -f setup.cfg ] && grep -q "install[-_]scripts" setup.cfg; then
$PYTHON -m pip install . --no-deps -vvv
else
# 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"
$PYTHON setup.py install --prefix="$PREFIX" --install-lib="$SP_DIR" $INSTALL_SCRIPTS_ARG --single-version-externally-managed --record=files.txt
else
$PYTHON -m pip install . --no-deps -vvv
fi

0 comments on commit 8fb224f

Please sign in to comment.