Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Add new "script" type for packages
Browse files Browse the repository at this point in the history
  • Loading branch information
vbraun committed Dec 19, 2015
1 parent a1b60f2 commit ba549f3
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -722,8 +722,9 @@ filtered_packages_list() {
[ "$PKG_TYPE" != "standard" ] && \
[ "$PKG_TYPE" != "optional" ] && \
[ "$PKG_TYPE" != "experimental" ] && \
[ "$PKG_TYPE" != "script" ] && \
[ "$PKG_TYPE" != "pip" ]; then
echo >&2 "The content of \"$PKG_TYPE_FILE\" must be 'base', 'standard', 'optional', 'experimental' or 'pip'"
echo >&2 "The content of \"$PKG_TYPE_FILE\" must be 'base', 'standard', 'optional', 'experimental', 'script', or 'pip'"
return 1
fi
Expand Down Expand Up @@ -852,6 +853,8 @@ filtered_packages_list all | while read PKG_NAME PKG_VERSION PKG_VAR; do
DEPS=" $(head -n 1 $DEP_FILE)"
elif [ "$TYPE" = optional ]; then
DEPS=' | $(STANDARD_PACKAGES)' # default for optional packages
elif [ "$TYPE" = script ]; then
DEPS=' | $(STANDARD_PACKAGES)' # default for script-only packages
elif [ "$TYPE" = pip ]; then
DEPS=' | $(INST)/$(PIP)'
else
Expand All @@ -868,6 +871,18 @@ filtered_packages_list all | while read PKG_NAME PKG_VERSION PKG_VAR; do
echo >&7 "$PKG_NAME-clean:"
echo >&7 " -sage --pip uninstall -y $PKG_NAME"
echo >&7
elif [ "$TYPE" = script ]; then
# Just run the spkg-install script
echo >&7 "$PKG_NAME:$DEPS"
echo >&7 " cd '$SAGE_ROOT' && \\"
echo >&7 " sage-logger '$SAGE_ROOT/build/pkgs/$PKG_NAME/spkg-install' \$(SAGE_LOGS)/$PKG_NAME.log"
echo >&7
# Just run the spkg-uninstall script if it exists
echo >&7 "$PKG_NAME-clean:"
echo >&7 " -cd '$SAGE_ROOT' && \\"
echo >&7 " '$SAGE_ROOT/build/pkgs/$PKG_NAME/spkg-uninstall'"
echo >&7
else
# Normal Sage packages
echo >&7 "\$(INST)/$PKG_VERSION:$DEPS"
Expand Down

0 comments on commit ba549f3

Please sign in to comment.