Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into t/34788/test_tic…
Browse files Browse the repository at this point in the history
…ket__python_3_12
  • Loading branch information
mkoeppe committed Jan 24, 2024
2 parents a482708 + 3dd953c commit 362fa8f
Show file tree
Hide file tree
Showing 653 changed files with 32,998 additions and 9,998 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "archlinux:latest downstream Sage",
"image": "archlinux:latest",
// Create an empty bashrc to avoid the error "No such file or directory" when opening a terminal.
"onCreateCommand": "EXTRA_SYSTEM_PACKAGES='sagemath sagemath-doc' EXTRA_SAGE_PACKAGES='notebook pip' .devcontainer/onCreate.sh && touch ~/.bashrc",
"onCreateCommand": "sed -i '/^NoExtract/d' /etc/pacman.conf; EXTRA_SYSTEM_PACKAGES='sagemath sagemath-doc' EXTRA_SAGE_PACKAGES='notebook pip' .devcontainer/onCreate.sh && touch ~/.bashrc",
// There's no SAGE_LOCAL, so remove the symlink 'prefix'.
"updateContentCommand": "rm -f prefix && ln -sf /usr venv",
"extensions": [
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,23 @@ jobs:
MAKE: make -j2 --output-sync=recurse
SAGE_NUM_THREADS: 2

- name: Check that all modules can be imported
run: |
# The following command checks that all modules can be imported.
# The output also includes a long list of modules together with the number of tests in each module.
# This can be ignored.
../sage -python -m pip install pytest-xdist
../sage -python -m pytest -c tox.ini -qq --doctest --collect-only || true
working-directory: ./worktree-image/src
env:
# Increase the length of the lines in the "short summary"
COLUMNS: 120

- name: Pytest
if: contains(github.ref, 'pytest')
run: |
../sage -python -m pip install coverage pytest-xdist
../sage -python -m coverage run -m pytest -c tox.ini --doctest-modules || true
../sage -python -m coverage run -m pytest -c tox.ini --doctest || true
working-directory: ./worktree-image/src
env:
# Increase the length of the lines in the "short summary"
Expand Down
21 changes: 18 additions & 3 deletions .github/workflows/ci-linux-incremental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- uses: actions/checkout@v4
- name: Get all packages that have changed
id: changed-packages
uses: tj-actions/changed-files@v38
uses: tj-actions/changed-files@v41
with:
files_yaml: |
configures:
Expand All @@ -63,6 +63,21 @@ jobs:
echo "uninstall_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.configures_all_changed_files }}; do echo $a | sed -E 's,build/pkgs/([a-z0-9][_.a-z0-9]*)/spkg-configure[.]m4 *,\1-uninstall,'; done | sort -u))" >> $GITHUB_OUTPUT
echo "build_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.pkgs_all_changed_files }}; do SPKG=$(echo $a | sed -E 's,-,_,g;s,(build/)?pkgs/([a-z0-9][-_.a-z0-9]*)/[^ ]* *,\2,;'); if [ -f "build/pkgs/$SPKG/checksums.ini" -o -f "build/pkgs/$SPKG/requirements.txt" -o -f "build/pkgs/$SPKG/spkg-install" ]; then echo "$SPKG-ensure"; fi; done | sort -u))" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
- uses: actions/checkout@v4
with:
ref: ${{ github.base_ref }}
path: worktree-base
if: github.base_ref
- name: Compute metrics
run: |
export PATH=build/bin:$PATH
if [ -d worktree-base ]; then
(echo "# $GITHUB_BASE_REF"; SAGE_ROOT=worktree-base sage-package metrics :all:) > base-metrics.txt
(echo "# $GITHUB_REF"; sage-package metrics :all:) > metrics.txt
diff --color=always --width=100 --side-by-side --left-column base-metrics.txt metrics.txt || true
else
sage-package metrics :all:
fi
test:
needs: [changed_files]
Expand All @@ -83,7 +98,7 @@ jobs:
from_docker_target: "with-targets"
from_docker_tag: "dev"
docker_targets: "with-targets"
targets: "${{needs.changed_files.outputs.uninstall_targets}} ${{needs.changed_files.outputs.build_targets}} build doc-html ptest"
targets: "${{needs.changed_files.outputs.uninstall_targets}} reconfigure ${{needs.changed_files.outputs.build_targets}} build doc-html ptest"
tox_system_factors: >-
["ubuntu-focal",
"ubuntu-jammy",
Expand Down Expand Up @@ -120,7 +135,7 @@ jobs:
from_docker_target: "with-targets"
from_docker_tag: "dev"
docker_targets: "with-targets"
targets: "${{needs.changed_files.outputs.uninstall_targets}} ${{needs.changed_files.outputs.build_targets}} build doc-html ptest"
targets: "${{needs.changed_files.outputs.uninstall_targets}} reconfigure ${{needs.changed_files.outputs.build_targets}} build doc-html ptest"
# Only test systems with a usable system python (>= 3.9)
# with only a small number of test failures as of 10.2.rc0
tox_system_factors: >-
Expand Down
16 changes: 15 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Sage: Pytest Doctests",
"type": "python",
"request": "launch",
"module": "pytest",
"args": [
"-c",
"src/tox.ini",
"--doctest",
"${file}"
],
"console": "integratedTerminal",
"justMyCode": false
},
{
"name": "Sage: Pytest",
"type": "python",
Expand Down Expand Up @@ -33,4 +47,4 @@
"justMyCode": false
}
],
}
}
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ title: SageMath
abstract: SageMath is a free open-source mathematics software system.
authors:
- name: "The SageMath Developers"
version: 10.3.beta4
version: 10.3.beta6
doi: 10.5281/zenodo.593563
date-released: 2023-12-26
date-released: 2024-01-21
repository-code: "https://github.com/sagemath/sage"
url: "https://www.sagemath.org/"
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ SPKG_COLLECT_FILES = build/pkgs/*/type build/pkgs/*/package-version.txt build/pk
# If configure was run before, rerun it with the old arguments.
# Otherwise, run configure with argument $PREREQ_OPTIONS.
build/make/Makefile: configure $(SPKG_COLLECT_FILES) $(CONFIG_FILES:%=%.in)
$(MAKE) reconfigure

reconfigure:
rm -f config.log
mkdir -p logs/pkgs
ln -s logs/pkgs/config.log config.log
Expand Down Expand Up @@ -339,7 +342,7 @@ list:
@$(MAKE) --silent build/make/Makefile >&2
@$(MAKE) --silent -f build/make/Makefile SAGE_PKGCONFIG=dummy $@

.PHONY: default build dist install micro_release \
.PHONY: default build dist install micro_release reconfigure \
misc-clean bdist-clean distclean bootstrap-clean maintainer-clean \
test check testoptional testall testlong testoptionallong testallong \
ptest ptestoptional ptestall ptestlong ptestoptionallong ptestallong \
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 10.3.beta4, Release Date: 2023-12-26
SageMath version 10.3.beta6, Release Date: 2024-01-21
4 changes: 2 additions & 2 deletions bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ EOF
if test -f "$DIR/requirements.txt" -o -f "$DIR/install-requires.txt"; then
# A Python package
SPKG_TREE_VAR=SAGE_VENV
echo "define(>>>SPKG_INSTALL_REQUIRES_${pkgname}<<<, >>>$(echo $(ENABLE_SYSTEM_SITE_PACKAGES=yes sage-get-system-packages install-requires ${pkgname}))<<<)dnl" >> m4/sage_spkg_versions.m4
echo "define(>>>SPKG_INSTALL_REQUIRES_${pkgname}<<<, >>>$(echo $(ENABLE_SYSTEM_SITE_PACKAGES=yes sage-get-system-packages install-requires-toml ${pkgname}))<<<)dnl" >> m4/sage_spkg_versions_toml.m4
echo "define(>>>SPKG_INSTALL_REQUIRES_${pkgname}<<<, >>>$(echo $(sage-get-system-packages install-requires ${pkgname}))<<<)dnl" >> m4/sage_spkg_versions.m4
echo "define(>>>SPKG_INSTALL_REQUIRES_${pkgname}<<<, >>>$(echo $(sage-get-system-packages install-requires-toml ${pkgname}))<<<)dnl" >> m4/sage_spkg_versions_toml.m4
fi
fi
spkg_finalizes="$spkg_finalizes
Expand Down
32 changes: 22 additions & 10 deletions build/bin/sage-get-system-packages
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,28 @@ case "$SYSTEM" in
esac
for PKG_BASE in $SPKGS; do

# Skip this package if it uses the SAGE_PYTHON_PACKAGE_CHECK
# macro and if --enable-system-site-packages was NOT passed
# to ./configure (or if ./configure has not yet been run).
SPKG_CONFIGURE="${SAGE_ROOT}/build/pkgs/${PKG_BASE}/spkg-configure.m4"
if [ -z "${ENABLE_SYSTEM_SITE_PACKAGES}" ]; then
if grep -q SAGE_PYTHON_PACKAGE_CHECK "${SPKG_CONFIGURE}" 2>/dev/null;
then
continue;
fi
fi
case "$SYSTEM:$ENABLE_SYSTEM_SITE_PACKAGES" in
install-requires*|pip*)
# This is output for installation of packages into a Python environment.
# So it's OK to use any Python packages.
;;
*:)
# --enable-system-site-packages was NOT passed to configure
# (or script was run outside of the sage-build-env).
#
# Skip this package if it uses the SAGE_PYTHON_PACKAGE_CHECK macro.
#
SPKG_CONFIGURE="${SAGE_ROOT}/build/pkgs/${PKG_BASE}/spkg-configure.m4"
if grep -q SAGE_PYTHON_PACKAGE_CHECK "${SPKG_CONFIGURE}" 2>/dev/null;
then
continue
fi
;;
*)
# --enable-system-site-packages was passed to configure.
# So any package (Python, non-Python) is fine.
;;
esac

for NAME in $SYSTEM_PACKAGES_FILE_NAMES; do
SYSTEM_PACKAGES_FILE="$SAGE_ROOT"/build/pkgs/$PKG_BASE/$NAME
Expand Down
3 changes: 1 addition & 2 deletions build/bin/write-dockerfile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,8 @@ EOF
ENDRUN=\'
;;
void*)
# https://hub.docker.com/r/voidlinux/masterdir-x86_64-musl
UPDATE="xbps-install -Suy &&"
EXISTS="xbps-query"
EXISTS="xbps-query -R"
INSTALL="xbps-install --yes"
;;
opensuse*)
Expand Down
3 changes: 3 additions & 0 deletions build/pkgs/_prereq/distros/void.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ make
perl
python3
tar
bash
which
# needed by gfortran
diffutils
Expand All @@ -29,3 +30,5 @@ xz
liblzma-devel
libffi-devel
zlib-devel
# to build python3 with the crypto module; there may be other packages that need it
libxcrypt-devel
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=05115739db242cb5a48ae17f97d06b179fc70334
md5=adc8208885e6be527b089b682079c464
cksum=3321256447
sha1=c72fc2006b1702e74f38c480b0376e3e6c8a5758
md5=a650e8682fe75708f679eabe918d2aa7
cksum=785462498
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
e95536ccbad199de456e804968a775f2744e4bff
919b021b0c103e4fb798cc784218015e0a515510
6 changes: 3 additions & 3 deletions build/pkgs/cython/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=Cython-VERSION.tar.gz
sha1=94945822403911b75608fa9689039187686437dd
md5=3b08e76d112619ed9b5bc240b6b53cf4
cksum=467020180
sha1=48f0535ce0b05e0e4ae4daa6a597a2cdd76274f5
md5=94ab8466d9350a31cfef3a0853c2fea5
cksum=2507297160
upstream_url=https://pypi.io/packages/source/C/Cython/Cython-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/cython/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.6
3.0.7
6 changes: 3 additions & 3 deletions build/pkgs/ecl/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=ecl-VERSION.tgz
sha1=c41838960964c6e0b9b83a08bca1f717ccc6951e
md5=0c9e0437dbf3a7f1b00da32b7794a3b0
cksum=1854014871
sha1=612f61f87eedb271025095306eca78d19f3991db
md5=16bcfd2ce9730691f88e74edaab790af
cksum=1542706373
upstream_url=https://common-lisp.net/project/ecl/static/files/release/ecl-VERSION.tgz
2 changes: 1 addition & 1 deletion build/pkgs/ecl/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
21.2.1
23.9.9
16 changes: 0 additions & 16 deletions build/pkgs/ecl/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,3 @@ exec </dev/null

sdh_make
sdh_make_install

# Create symbolic link to lib/ecl-version directory.
# Also create a symbolic link lib/ecl/ecl -> include/ecl.
# This is important when the Sage install is moved, see Trac #14662.
cd "$SAGE_DESTDIR$SAGE_LOCAL/lib/" && rm -f ecl && ln -s ecl-* ecl
if [ $? -ne 0 ]; then
echo >&2 "Error - Failed to create symbolic link to ECL library"
echo >&2 "directory ... exiting"
exit 1
fi
cd "$SAGE_DESTDIR$SAGE_LOCAL/lib/ecl" && rm -f ecl && ln -s ../../include/ecl ecl
if [ $? -ne 0 ]; then
echo >&2 "Error - Failed to create symbolic link to ECL include"
echo >&2 "directory ... exiting"
exit 1
fi
51 changes: 0 additions & 51 deletions build/pkgs/glpk/patches/src/01-zlib.patch

This file was deleted.

62 changes: 0 additions & 62 deletions build/pkgs/glpk/spkg-src

This file was deleted.

2 changes: 1 addition & 1 deletion build/pkgs/importlib_metadata/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# According to https://pypi.org/project/importlib-metadata/,
# 4.13 provides the features of Python 3.11 importlib.metadata
importlib_metadata >=4.13
importlib_metadata >=4.13; python_version<"3.11"
2 changes: 1 addition & 1 deletion build/pkgs/importlib_resources/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# According to https://pypi.org/project/importlib-resources/,
# version 5.7 provides the features of Python 3.11 importlib.resources
importlib_resources >= 5.7
importlib_resources >= 5.7; python_version<"3.11"
Loading

0 comments on commit 362fa8f

Please sign in to comment.