Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Commit 2fc350e

Browse files
author
Release Manager
committed
Trac #30947: src/doc/bootstrap: Simplify by using new options of "sage -package list"
URL: https://trac.sagemath.org/30947 Reported by: mkoeppe Ticket author(s): Matthias Koeppe Reviewer(s): Sébastien Labbé
2 parents 831e4e2 + 084fbf6 commit 2fc350e

File tree

3 files changed

+10
-22
lines changed

3 files changed

+10
-22
lines changed

build/pkgs/configure/checksums.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
tarball=configure-VERSION.tar.gz
2-
sha1=9630148997eadc90f50a99bc8902d9759cd63d4d
3-
md5=c73af26d82eac1af9725ca780e650ebb
4-
cksum=78369567
2+
sha1=8ecca12a12bf8706ec8409cfbc732f028ac80b9d
3+
md5=b96290622ae27430c92385b38a20c172
4+
cksum=3364064440
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3290413be62de2cc4b8568c058ffe33b05acca0b
1+
032dca1061966a9ebcc4950d4b9d5aad0862b52b

src/doc/bootstrap

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,10 @@ for SYSTEM in arch debian fedora cygwin homebrew conda; do
3131
SAGELIB_SYSTEM_PACKAGES=
3232
SAGELIB_OPTIONAL_SYSTEM_PACKAGES=
3333
RECOMMENDED_SYSTEM_PACKAGES=
34-
for PKG_SCRIPTS in build/pkgs/*; do
35-
if [ -d $PKG_SCRIPTS ]; then
36-
PKG_BASE=$(basename $PKG_SCRIPTS)
37-
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/distros/$SYSTEM.txt
38-
if [ ! -f $PKG_SCRIPTS/type ]; then
39-
echo >&2 "Warning: $PKG_SCRIPTS/type is missing."
40-
continue
41-
fi
42-
PKG_TYPE=$(cat $PKG_SCRIPTS/type)
43-
if [ -f $SYSTEM_PACKAGES_FILE ]; then
34+
for PKG_BASE in $(./sage --package list --has-file distros/$SYSTEM.txt); do
35+
PKG_SCRIPTS=build/pkgs/$PKG_BASE
36+
SYSTEM_PACKAGES_FILE=$PKG_SCRIPTS/distros/$SYSTEM.txt
37+
PKG_TYPE=$(cat $PKG_SCRIPTS/type)
4438
PKG_SYSTEM_PACKAGES=$(echo $(${STRIP_COMMENTS} $SYSTEM_PACKAGES_FILE))
4539
if [ -n "PKG_SYSTEM_PACKAGES" ]; then
4640
if [ -f $PKG_SCRIPTS/spkg-configure.m4 ]; then
@@ -66,8 +60,6 @@ for SYSTEM in arch debian fedora cygwin homebrew conda; do
6660
esac
6761
fi
6862
fi
69-
fi
70-
fi
7163
done
7264
if [ "${SYSTEM}" = "conda" ]; then
7365
if [ "${BOOTSTRAP_QUIET}" = "no" ]; then
@@ -120,16 +112,12 @@ External Packages
120112
:maxdepth: 1
121113
122114
EOF
123-
for PKG_SCRIPTS in build/pkgs/*; do
124-
if [ -d "$PKG_SCRIPTS" ]; then
125-
PKG_BASE=$(basename "$PKG_SCRIPTS")
126-
if [ -f "$PKG_SCRIPTS"/SPKG.rst ]; then
115+
for PKG_BASE in $(./sage --package list --has-file SPKG.rst); do
116+
PKG_SCRIPTS=build/pkgs/$PKG_BASE
127117
# Instead of just copying, we may want to call
128118
# a version of sage-spkg-info to format extra information.
129119
cp "$PKG_SCRIPTS"/SPKG.rst "$OUTPUT_DIR"/$PKG_BASE.rst
130120
echo >> "$OUTPUT_INDEX" " $PKG_BASE"
131-
fi
132-
fi
133121
done
134122
cat >> "$OUTPUT_INDEX" <<EOF
135123
.. include:: ../footer.txt

0 commit comments

Comments
 (0)