Skip to content

Commit 79143df

Browse files
committed
Merge tag '10.4.beta7' into setsystem_input
SageMath version 10.4.beta7, Release Date: 2024-05-25
2 parents 09ec114 + 77323e2 commit 79143df

1,062 files changed

Lines changed: 9558 additions & 12048 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.ci/create-changes-html.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ for block in diff_blocks:
8282
if content:
8383
with open(file_path, 'w') as file:
8484
file.writelines(content)
85-
path = 'html/' + doc
85+
path = doc
8686
hunks = '&nbsp;'.join(f'<a href="{path}#hunk{i+1}" class="hunk" target="_blank">#{i + 1}</a>' for i in range(count))
8787
out_blocks.append(f'<p class="diff"><a href="{path}">{doc}</a>&nbsp;' + hunks + '&emsp;</p>'
8888
+ '\n<pre><code class="language-diff">'

.ci/retrofit-worktree.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@ export GIT_AUTHOR_EMAIL="ci-sage@example.com"
1212
export GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"
1313
export GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"
1414

15+
set -e
16+
1517
# Set globally for other parts of the workflow
1618
git config --global user.name "$GIT_AUTHOR_NAME"
1719
git config --global user.email "$GIT_AUTHOR_EMAIL"
1820

19-
set -ex
21+
set -x
2022

2123
# If actions/checkout downloaded our source tree using the GitHub REST API
2224
# instead of with git (because do not have git installed in our image),
@@ -36,6 +38,10 @@ git tag -f new
3638
# The changed files now show up as uncommitted changes.
3739
# The final "git add -N" makes sure that files that were added in "new" do not show
3840
# as untracked files, which would be removed by "git clean -fx".
41+
if [ -L $WORKTREE_NAME ]; then
42+
rm -f $WORKTREE_NAME
43+
git worktree prune --verbose
44+
fi
3945
git worktree add --detach $WORKTREE_NAME
4046
rm -rf $WORKTREE_DIRECTORY/.git && mv $WORKTREE_NAME/.git $WORKTREE_DIRECTORY/
4147
rm -rf $WORKTREE_NAME && ln -s $WORKTREE_DIRECTORY $WORKTREE_NAME

.ci/write-dockerfile.sh

Lines changed: 41 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,41 @@
11
#! /usr/bin/env bash
2-
## Write a Dockerfile to stdout that tests that the packages listed in the debian.txt/fedora.txt files of standard spkg exist
3-
## and satisfy the requirements tested by spkg-configure.m4
4-
## This is called by $SAGE_ROOT/tox.ini
52
set -e
6-
SYSTEM="${1:-debian}"
73
shopt -s extglob
4+
##
5+
## Write a Dockerfile for portability testing to stdout.
6+
##
7+
## This script needs to be run from SAGE_ROOT (root of the Sage repository).
8+
## It is called by $SAGE_ROOT/tox.ini for all environments 'tox -e docker-...'
9+
##
10+
## Positional arguments:
11+
##
12+
SYSTEM="${1:-debian}"
813
SAGE_PACKAGE_LIST_ARGS="${2:-:standard:}"
914
WITH_SYSTEM_SPKG="${3:-yes}"
1015
IGNORE_MISSING_SYSTEM_PACKAGES="${4:-no}"
1116
EXTRA_SAGE_PACKAGES="${5:-_bootstrap}"
12-
#
17+
##
18+
## Environment variables that take influence:
19+
##
20+
## - BOOTSTRAP
21+
## - CONFIGURE_ARGS
22+
## - DEVTOOLSET
23+
## - DIST_UPGRADE
24+
## - DOCKER_BUILDKIT
25+
## - EXTRA_PATH
26+
## - EXTRA_REPOSITORIES
27+
## - EXTRA_SYSTEM_PACKAGES
28+
## - FULL_BASE_IMAGE_AND_TAG
29+
## - SKIP_SYSTEM_PKG_INSTALL
30+
## - USE_CONDARC
31+
## - __CHOWN
32+
## - __SUDO
33+
##
1334
STRIP_COMMENTS="sed s/#.*//;"
1435
SAGE_ROOT=.
1536
export PATH="$SAGE_ROOT"/build/bin:$PATH
1637
SYSTEM_PACKAGES=$EXTRA_SYSTEM_PACKAGES
17-
CONFIGURE_ARGS="--enable-option-checking "
38+
SYSTEM_CONFIGURE_ARGS="--enable-option-checking "
1839
for SPKG in $(sage-package list --has-file=spkg-configure.m4 $SAGE_PACKAGE_LIST_ARGS) $EXTRA_SAGE_PACKAGES; do
1940
SYSTEM_PACKAGE=$(sage-get-system-packages $SYSTEM $SPKG)
2041
if [ -n "${SYSTEM_PACKAGE}" ]; then
@@ -24,7 +45,7 @@ for SPKG in $(sage-package list --has-file=spkg-configure.m4 $SAGE_PACKAGE_LIST_
2445
# shell-quote package if necessary
2546
SYSTEM_PACKAGES+=$(printf " %q" "$a")
2647
done
27-
CONFIGURE_ARGS+="--with-system-${SPKG}=${WITH_SYSTEM_SPKG} "
48+
SYSTEM_CONFIGURE_ARGS+="--with-system-${SPKG}=${WITH_SYSTEM_SPKG} "
2849
fi
2950
done
3051
echo "# Automatically generated by SAGE_ROOT/.ci/write-dockerfile.sh"
@@ -247,19 +268,17 @@ $ADD Makefile VERSION.txt COPYING.txt condarc.yml README.md bootstrap bootstrap-
247268
$ADD config/config.rpath /new/config/config.rpath
248269
$ADD src/doc/bootstrap /new/src/doc/bootstrap
249270
$ADD src/bin /new/src/bin
250-
$ADD src/Pipfile.m4 src/pyproject.toml.m4 src/requirements.txt.m4 src/setup.cfg.m4 src/VERSION.txt /new/src/
271+
$ADD src/Pipfile.m4 src/pyproject.toml src/requirements.txt.m4 src/setup.cfg.m4 src/VERSION.txt /new/src/
251272
$ADD m4 /new/m4
252273
$ADD pkgs /new/pkgs
253274
$ADD build /new/build
254275
$ADD .ci /new/.ci
255276
$ADD .upstream.d /new/.upstream.d
256277
RUN if [ -d /sage ]; then \
257278
echo "### Incremental build from \$(cat /sage/VERSION.txt)" && \
258-
if command -v git; then \
259-
(cd /new && \
260-
echo /src >> .gitignore && \
261-
./.ci/retrofit-worktree.sh worktree-image /sage); \
262-
else \
279+
printf '/src\n!/src/doc/bootstrap\n!/src/bin\n!/src/*.m4\n!/src/*.toml\n!/src/VERSION.txt\n' >> /sage/.gitignore && \
280+
printf '/src\n!/src/doc/bootstrap\n!/src/bin\n!/src/*.m4\n!/src/*.toml\n!/src/VERSION.txt\n' >> /new/.gitignore && \
281+
if ! (cd /new && ./.ci/retrofit-worktree.sh worktree-image /sage); then \
263282
for a in local logs; do \
264283
if [ -d /sage/\$a ]; then mv /sage/\$a /new/; fi; \
265284
done; \
@@ -271,21 +290,21 @@ RUN if [ -d /sage ]; then \
271290
fi
272291
WORKDIR /sage
273292
274-
ARG BOOTSTRAP=${BOOTSTRAP-./bootstrap}
293+
ARG BOOTSTRAP="${BOOTSTRAP-./bootstrap}"
275294
$RUN sh -x -c "\${BOOTSTRAP}" $ENDRUN $THEN_SAVE_STATUS
276295
277296
FROM bootstrapped as configured
278297
#:configuring:
279298
RUN $CHECK_STATUS_THEN mkdir -p logs/pkgs; rm -f config.log; ln -s logs/pkgs/config.log config.log
280-
ARG EXTRA_CONFIGURE_ARGS="${CONFIGURE_ARGS}"
299+
ARG CONFIGURE_ARGS="${CONFIGURE_ARGS:---enable-build-as-root}"
281300
EOF
282301
if [ ${WITH_SYSTEM_SPKG} = "force" ]; then
283302
cat <<EOF
284-
$RUN echo "****** Configuring: ./configure --enable-build-as-root $CONFIGURE_ARGS \${EXTRA_CONFIGURE_ARGS} *******"; ./configure --enable-build-as-root $CONFIGURE_ARGS \${EXTRA_CONFIGURE_ARGS} || (echo "********** configuring without forcing ***********"; echo "::group::config.log"; cat config.log; echo "::endgroup::"; ./configure --enable-build-as-root; echo "::group::config.log"; cat config.log; echo "::endgroup::"; exit 1) $ENDRUN $THEN_SAVE_STATUS
303+
$RUN ./configure $SYSTEM_CONFIGURE_ARGS \${CONFIGURE_ARGS} || (echo "::group::config.log"; cat config.log; echo "::endgroup::"; echo "********** configuring without forcing ***********"; ./configure \${CONFIGURE_ARGS}; echo "::group::config.log"; cat config.log; echo "::endgroup::"; exit 1) $ENDRUN $THEN_SAVE_STATUS
285304
EOF
286305
else
287306
cat <<EOF
288-
$RUN echo "****** Configuring: ./configure --enable-build-as-root $CONFIGURE_ARGS \${EXTRA_CONFIGURE_ARGS} *******"; ./configure --enable-build-as-root $CONFIGURE_ARGS \${EXTRA_CONFIGURE_ARGS} || (echo "::group::config.log"; cat config.log; echo "::endgroup::"; exit 1) $ENDRUN $THEN_SAVE_STATUS
307+
$RUN ./configure $SYSTEM_CONFIGURE_ARGS \${CONFIGURE_ARGS} || (echo "::group::config.log"; cat config.log; echo "::endgroup::"; exit 1) $ENDRUN $THEN_SAVE_STATUS
289308
EOF
290309
fi
291310
cat <<EOF
@@ -318,12 +337,11 @@ ENV SAGE_CHECK=warn
318337
ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!gap,!cysignals,!linbox,!git,!ppl,!cmake,!rpy2,!sage_sws2rst"
319338
$ADD .gitignore /new/.gitignore
320339
$ADD src /new/src
321-
RUN if command -v git; then \
322-
cd /new && rm -rf .git && \
323-
./.ci/retrofit-worktree.sh worktree-pre /sage; \
324-
else \
325-
rm -rf /sage/src; \
326-
mv /new/src /sage/src; \
340+
RUN cd /new && rm -rf .git && \
341+
if ! /sage/.ci/retrofit-worktree.sh worktree-pre /sage; then \
342+
rm -rf /sage/src; \
343+
mv src /sage/src; \
344+
cd /sage && ./bootstrap && ./config.status; \
327345
fi
328346
329347
ARG TARGETS="build"

.devcontainer/portability-debian-buster-gcc_spkg-minimal/devcontainer.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

.devcontainer/portability-debian-buster-gcc_spkg-minimal/portability-Dockerfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

.devcontainer/portability-debian-buster-gcc_spkg-standard/devcontainer.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

.devcontainer/portability-debian-buster-gcc_spkg-standard/portability-Dockerfile

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/dist.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ jobs:
166166
arch: x86_64
167167
- os: ubuntu-latest
168168
arch: i686
169-
- os: macos-latest
169+
- os: macos-13
170170
arch: x86_64
171171
- os: macos-14
172172
arch: arm64
@@ -175,16 +175,16 @@ jobs:
175175
# SPKGs to install as system packages
176176
SPKGS: _bootstrap _prereq
177177
# Non-Python packages to install as spkgs
178-
TARGETS_PRE: gmpy2-build-deps
178+
TARGETS_PRE: gmp mpfr mpc bliss coxeter3 mcqd meataxe sirocco boost_cropped tdlib
179179
# Disable building PyPy wheels on all platforms
180180
# Disable musllinux until #33083 provides alpine package information
181181
CIBW_SKIP: "pp* *-musllinux*"
182182
#
183183
CIBW_ARCHS: ${{ matrix.arch }}
184184
# https://cibuildwheel.readthedocs.io/en/stable/options/#requires-python
185-
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9, <3.12"
185+
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9, <3.13"
186186
# Environment during wheel build
187-
CIBW_ENVIRONMENT: "PATH=$(pwd)/local/bin:$PATH CPATH=$(pwd)/local/include:$CPATH LIBRARY_PATH=$(pwd)/local/lib:$LIBRARY_PATH PKG_CONFIG_PATH=$(pwd)/local/share/pkgconfig:$PKG_CONFIG_PATH ACLOCAL_PATH=/usr/share/aclocal"
187+
CIBW_ENVIRONMENT: "PATH=$(pwd)/prefix/bin:$PATH CPATH=$(pwd)/prefix/include:$CPATH LIBRARY_PATH=$(pwd)/prefix/lib:$LIBRARY_PATH LD_LIBRARY_PATH=$(pwd)/prefix/lib:$LD_LIBRARY_PATH PKG_CONFIG_PATH=$(pwd)/prefix/share/pkgconfig:$PKG_CONFIG_PATH ACLOCAL_PATH=/usr/share/aclocal PIP_CONSTRAINT=$(pwd)/constraints.txt"
188188
# Use 'build', not 'pip wheel'
189189
CIBW_BUILD_FRONTEND: build
190190
steps:
@@ -203,23 +203,36 @@ jobs:
203203
python-version: "3.8 - 3.12"
204204
update-environment: false
205205

206+
- name: Bootstrap
207+
run: |
208+
export PATH=$(pwd)/build/bin:$PATH
209+
eval $(sage-print-system-package-command auto --sudo --yes --no-install-recommends --spkg install _bootstrap)
210+
./bootstrap
211+
206212
- name: Build platform wheels
207213
# We build the wheels from the sdists so that MANIFEST filtering becomes effective.
208214
# But we must run cibuildwheel with the unpacked source directory, not a tarball,
209215
# so that SAGE_ROOT is copied into the build containers.
210216
#
211217
# In the CIBW_BEFORE_ALL phase, we install libraries using the Sage distribution.
212218
# https://cibuildwheel.readthedocs.io/en/stable/options/#before-all
213-
# This is unfortunately repeated for each of the packages that we build wheels for
219+
# For Linux, this is repeated for each of the packages that we build wheels for
214220
# because CIBW starts with a fresh container on each invocation.
221+
# Therefore we cache it in a directory mounted from the host: /host
222+
# https://cibuildwheel.pypa.io/en/stable/faq/#linux-builds-in-containers
223+
#
224+
# omit sagemath-{meataxe,sirocco} for now -- needs sagemath-modules
215225
run: |
216226
"${{ steps.python.outputs.python-path }}" -m pip install pipx
217227
export PATH=build/bin:$PATH
218-
export CIBW_BEFORE_ALL="( $(sage-print-system-package-command debian --yes --no-install-recommends install $(sage-get-system-packages debian $SPKGS)) || $(sage-print-system-package-command fedora --yes --no-install-recommends install $(sage-get-system-packages fedora $SPKGS | sed s/pkg-config/pkgconfig/)) || ( $(sage-print-system-package-command homebrew --yes --no-install-recommends install $(sage-get-system-packages homebrew $SPKGS)) || echo error ignored) ) && ./bootstrap && ./configure --enable-build-as-root && make -j4 V=0 $TARGETS_PRE"
228+
export CIBW_BEFORE_ALL="( $(sage-print-system-package-command debian --yes --no-install-recommends install $(sage-get-system-packages debian $SPKGS)) || $(sage-print-system-package-command fedora --yes --no-install-recommends install $(sage-get-system-packages fedora $SPKGS | sed s/pkg-config/pkgconfig/)) || ( $(sage-print-system-package-command homebrew --yes --no-install-recommends install $(sage-get-system-packages homebrew $SPKGS)) || echo error ignored) ) && if cp /host/sage-\$AUDITWHEEL_PLAT/config.status . 2>/dev/null; then chmod +x config.status; fi && if [ -x ./config.status ]; then ./config.status; else ./configure --enable-build-as-root ${{ startsWith(matrix.os, 'ubuntu') && '--prefix=/host/sage-\$AUDITWHEEL_PLAT' || '' }} && cp config.status prefix/; fi && MAKE=\"make -j6\" make V=0 $TARGETS_PRE && (echo \"sage_conf @ file://\$(pwd)/pkgs/sage-conf\" && echo \"sage_setup @ file://\$(pwd)/pkgs/sage-setup\") > constraints.txt"
219229
mkdir -p unpacked
220-
for pkg in sagemath-objects sagemath-categories; do
230+
for pkg in sagemath*objects sagemath*categories sagemath*bliss sagemath*coxeter3 sagemath*mcqd sagemath*tdlib; do
231+
case "$pkg:${{ matrix.arch }}" in
232+
sagemath*tdlib:i686) continue;; # broken - boost-related
233+
esac
221234
(cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz
222-
"${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.17.0 unpacked/$pkg*
235+
"${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.18.0 unpacked/$pkg*
223236
done
224237
225238
- uses: actions/upload-artifact@v4

.github/workflows/docker.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ on:
2525
"ubuntu-lunar",
2626
"ubuntu-mantic",
2727
"ubuntu-noble",
28-
"debian-buster-gcc_spkg",
2928
"debian-bullseye",
3029
"debian-bookworm",
3130
"debian-trixie",

.github/workflows/docker_hub.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
default: make-build
1111
type: string
1212

13+
env:
14+
CAN_LOGIN: ${{ secrets.DOCKERHUB_USERNAME != '' && secrets.DOCKERHUB_TOKEN != '' }}
15+
1316
jobs:
1417
build-and-push:
1518
name: Build Docker image and push to DockerHub
@@ -71,11 +74,12 @@ jobs:
7174
if: env.JOB_DONE == 'false'
7275

7376
- name: Login to Docker Hub
77+
id: login
7478
uses: docker/login-action@v3
7579
with:
7680
username: ${{ secrets.DOCKERHUB_USERNAME }}
7781
password: ${{ secrets.DOCKERHUB_TOKEN }}
78-
if: env.JOB_DONE == 'false'
82+
if: env.JOB_DONE == 'false' && env.CAN_LOGIN == 'true'
7983

8084
- name: Build and push make-build
8185
uses: docker/build-push-action@v5
@@ -85,8 +89,9 @@ jobs:
8589
target: ${{ inputs.dockerfile_target }}
8690
build-args: |
8791
MAKE_BUILD=${{ env.BASE }}
88-
push: true
92+
push: ${{ steps.login.outcome == 'success' }}
8993
tags: ${{ env.TAG_LIST }}
9094
cache-from: type=gha
9195
cache-to: type=gha,mode=max
92-
if: env.JOB_DONE == 'false'
96+
# run even if there are no push credentials (just don't push)
97+
if: (success() || failure()) && env.JOB_DONE == 'false'

0 commit comments

Comments
 (0)