Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix logic in build_ament_python.sh.in to detect setup.cfg #49

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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