Skip to content

Commit 978f846

Browse files
author
Matthias Koeppe
committed
bootstrap-conda: Update use of 'sage-package dependencies'
1 parent 8833b3b commit 978f846

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

bootstrap-conda

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ STRIP_COMMENTS="sed s/#.*//;"
1010

1111
shopt -s extglob
1212

13-
DEVELOP_SPKG_PATTERN="@(_develop$(for a in $(sage-package dependencies _develop); do echo -n "|"$a; done))"
13+
eval $(sage-package dependencies --format=shell :all:)
14+
DEVELOP_SPKG_PATTERN="@(_develop${runtime_deps__develop// /|})"
1415
BOOTSTRAP_PACKAGES=_bootstrap
1516
PACKAGES=
1617
OPTIONAL_PACKAGES=
@@ -139,18 +140,22 @@ echo >&2 $0:$LINENO: generate conda environment files
139140
if [ ! -f $SYSTEM_PACKAGES_FILE ]; then
140141
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/version_requirements.txt
141142
fi
142-
if grep -q SAGERUNTIME $PKG_SCRIPTS/dependencies $PKG_SCRIPTS/dependencies_order_only 2>/dev/null; then
143-
: # cannot install packages that depend on the Sage library
144-
else
145-
case "$PKG_BASE:$PKG_TYPE" in
146-
$DEVELOP_SPKG_PATTERN:*) FD=4;;
147-
*:standard) FD="4 5";;
148-
*) FD=5;;
149-
esac
150-
${STRIP_COMMENTS} $SYSTEM_PACKAGES_FILE | while read -r line; do
151-
[ -n "$line" ] && for fd in $FD; do echo >&$fd " - $line"; done
152-
done
153-
fi
143+
eval DEPS=\"\$runtime_deps_$PKG_BASE\ \$build_deps_$PKG_BASE\ \$order_only_deps_$PKG_BASE\"
144+
case "$DEPS" in
145+
*SAGERUNTIME*)
146+
# cannot install packages that depend on the Sage library
147+
;;
148+
*)
149+
case "$PKG_BASE:$PKG_TYPE" in
150+
$DEVELOP_SPKG_PATTERN:*) FD=4;;
151+
*:standard) FD="4 5";;
152+
*) FD=5;;
153+
esac
154+
${STRIP_COMMENTS} $SYSTEM_PACKAGES_FILE | while read -r line; do
155+
[ -n "$line" ] && for fd in $FD; do echo >&$fd " - $line"; done
156+
done
157+
;;
158+
esac
154159
done
155160
) 4>> /dev/null 5>> src/environment-optional-template.yml
156161

0 commit comments

Comments
 (0)