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

Commit

Permalink
src/bin/sage-update-version: Update install-requires.txt for the dist…
Browse files Browse the repository at this point in the history
…ribution packages in pkgs/
  • Loading branch information
Matthias Koeppe committed Jul 25, 2022
1 parent e82312a commit 8358976
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 9 deletions.
3 changes: 2 additions & 1 deletion build/pkgs/sage_conf/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sage-conf ~= 9.7.b3
# This file is updated on every release by the sage-update-version script
sage-conf ~= 9.7b6
3 changes: 2 additions & 1 deletion build/pkgs/sage_docbuild/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sage_docbuild
# This file is updated on every release by the sage-update-version script
sage-docbuild ~= 9.7b6
3 changes: 2 additions & 1 deletion build/pkgs/sage_setup/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sage-setup ~= 9.7.b3
# This file is updated on every release by the sage-update-version script
sage-setup ~= 9.7b6
3 changes: 2 additions & 1 deletion build/pkgs/sage_sws2rst/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sage_sws2rst
# This file is updated on every release by the sage-update-version script
sage-sws2rst ~= 9.7b6
3 changes: 2 additions & 1 deletion build/pkgs/sagelib/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sagemath-standard
# This file is updated on every release by the sage-update-version script
sagelib ~= 9.7b6
3 changes: 2 additions & 1 deletion build/pkgs/sagemath_categories/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sagemath-categories ~= 9.5b6
# This file is updated on every release by the sage-update-version script
sagemath-categories ~= 9.7b6
3 changes: 2 additions & 1 deletion build/pkgs/sagemath_environment/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sagemath-environment == 9.6rc3.post2
# This file is updated on every release by the sage-update-version script
sagemath-environment ~= 9.7b6
4 changes: 2 additions & 2 deletions build/pkgs/sagemath_objects/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Pinned in Trac #29941 until proper namespace packages are supported in #28925.
sagemath-objects == 9.6rc3.post4
# This file is updated on every release by the sage-update-version script
sagemath-objects ~= 9.7b6
16 changes: 16 additions & 0 deletions src/bin/sage-update-version
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ for version_file in "$SAGE_ROOT"/pkgs/*/VERSION.txt; do
fi
done

# Update install-requires.txt for all distribution packages
( cd "$SAGE_ROOT"/build/pkgs/ && for spkg in sage*; do
if [ -f "$spkg"/install-requires.txt -a -d "$spkg"/src ]; then
( echo "# This file is updated on every release by the sage-update-version script"
# Normalize the package name to PyPI convention (dashes, not underscores)
pkg=${spkg//_/-}
# Normalize the version (updated above as VERSION.txt) according to PEP440.
version=$(cat "$spkg"/package-version.txt)
version=${version//.beta/b}
version=${version//.rc/rc}
# ~= asks for a compatible release. https://peps.python.org/pep-0440/#compatible-release
echo "$pkg ~= $version" ) > "$spkg"/install-requires.txt
fi
done )

# Update Sage version file for Python in SAGE_SRC/sage
cat <<EOF > "$SAGE_SRC/sage/version.py"
# Sage version information for Python scripts
Expand Down Expand Up @@ -81,6 +96,7 @@ git commit -m "Updated SageMath version to $SAGE_VERSION" -- \
"$SAGE_SRC/bin/sage-version.sh" \
"$SAGE_ROOT/build/pkgs/configure/checksums.ini" \
"$SAGE_ROOT/build/pkgs/configure/package-version.txt" \
"$SAGE_ROOT/build/pkgs/*/install-requires.txt" \
"$SAGE_ROOT"/pkgs/*/VERSION.txt \
|| die "Error committing to the repository."

Expand Down

0 comments on commit 8358976

Please sign in to comment.