Skip to content

Commit 3e788bc

Browse files
author
Matthias Koeppe
committed
Merge remote-tracking branch 'upstream/develop' into is_PowerSeriesRing_deprecation
2 parents 47ec976 + 79c047c commit 3e788bc

File tree

463 files changed

+6641
-3206
lines changed

Some content is hidden

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

463 files changed

+6641
-3206
lines changed

.ci/set_labels_by_changes.sh

-71
This file was deleted.

.ci/write-dockerfile.sh

+14-8
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ ADD="ADD $__CHOWN"
5555
RUN=RUN
5656
cat <<EOF
5757
ARG BASE_IMAGE=$(eval echo "${FULL_BASE_IMAGE_AND_TAG}")
58-
FROM \${BASE_IMAGE} as with-system-packages
58+
FROM \${BASE_IMAGE} AS with-system-packages
5959
EOF
6060
case $SYSTEM in
6161
debian*|ubuntu*)
@@ -199,7 +199,7 @@ EOF
199199
*)
200200
cat <<EOF
201201
ARG BASE_IMAGE
202-
FROM \${BASE_IMAGE} as with-system-packages
202+
FROM \${BASE_IMAGE} AS with-system-packages
203203
EOF
204204
INSTALL=$(sage-print-system-package-command $SYSTEM install " ")
205205
;;
@@ -260,9 +260,15 @@ case ${DOCKER_BUILDKIT-0} in
260260
CHECK_STATUS_THEN='STATUS=$(cat STATUS 2>/dev/null); case "$STATUS" in ""|0) ;; *) exit $STATUS;; esac; '
261261
esac
262262

263+
if [ -n "$GITHUB_ACTIONS" ]; then
264+
cat <<EOF
265+
ENV GITHUB_ACTIONS=1
266+
EOF
267+
fi
268+
263269
cat <<EOF
264270
265-
FROM with-system-packages as bootstrapped
271+
FROM with-system-packages AS bootstrapped
266272
#:bootstrapping:
267273
RUN rm -rf /new /sage/.git
268274
$ADD Makefile VERSION.txt COPYING.txt condarc.yml README.md bootstrap bootstrap-conda configure.ac sage .homebrew-build-env tox.ini Pipfile.m4 .gitignore /new/
@@ -295,7 +301,7 @@ WORKDIR /sage
295301
ARG BOOTSTRAP="${BOOTSTRAP-./bootstrap}"
296302
$RUN sh -x -c "\${BOOTSTRAP}" $ENDRUN $THEN_SAVE_STATUS
297303
298-
FROM bootstrapped as configured
304+
FROM bootstrapped AS configured
299305
#:configuring:
300306
RUN $CHECK_STATUS_THEN mkdir -p logs/pkgs; rm -f config.log; ln -s logs/pkgs/config.log config.log
301307
ARG CONFIGURE_ARGS="${CONFIGURE_ARGS:---enable-build-as-root}"
@@ -311,7 +317,7 @@ EOF
311317
fi
312318
cat <<EOF
313319
314-
FROM configured as with-base-toolchain
320+
FROM configured AS with-base-toolchain
315321
# We first compile base-toolchain because otherwise lots of packages are missing their dependency on 'patch'
316322
ARG NUMPROC=8
317323
ENV MAKE="make -j\${NUMPROC}"
@@ -321,7 +327,7 @@ ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!gap,!cysignals,!linbox,!git,!ppl,!
321327
#:toolchain:
322328
$RUN $CHECK_STATUS_THEN make \${USE_MAKEFLAGS} base-toolchain $ENDRUN $THEN_SAVE_STATUS
323329
324-
FROM with-base-toolchain as with-targets-pre
330+
FROM with-base-toolchain AS with-targets-pre
325331
ARG NUMPROC=8
326332
ENV MAKE="make -j\${NUMPROC}"
327333
ARG USE_MAKEFLAGS="-k V=0"
@@ -331,7 +337,7 @@ ENV SAGE_CHECK_PACKAGES="!cython,!r,!python3,!gap,!cysignals,!linbox,!git,!ppl,!
331337
ARG TARGETS_PRE="all-sage-local"
332338
$RUN $CHECK_STATUS_THEN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS_PRE} $ENDRUN $THEN_SAVE_STATUS
333339
334-
FROM with-targets-pre as with-targets
340+
FROM with-targets-pre AS with-targets
335341
ARG NUMPROC=8
336342
ENV MAKE="make -j\${NUMPROC}"
337343
ARG USE_MAKEFLAGS="-k V=0"
@@ -353,7 +359,7 @@ RUN cd /new && rm -rf .git && \
353359
ARG TARGETS="build"
354360
$RUN $CHECK_STATUS_THEN make SAGE_SPKG="sage-spkg -y -o" \${USE_MAKEFLAGS} \${TARGETS} $ENDRUN $THEN_SAVE_STATUS
355361
356-
FROM with-targets as with-targets-optional
362+
FROM with-targets AS with-targets-optional
357363
ARG NUMPROC=8
358364
ENV MAKE="make -j\${NUMPROC}"
359365
ARG USE_MAKEFLAGS="-k V=0"

.devcontainer/portability-centos-7-devtoolset-gcc_11-minimal/devcontainer.json

-25
This file was deleted.

.devcontainer/portability-centos-7-devtoolset-gcc_11-minimal/portability-Dockerfile

-1
This file was deleted.

.devcontainer/portability-centos-7-devtoolset-gcc_11-standard/devcontainer.json

-25
This file was deleted.

.devcontainer/portability-centos-7-devtoolset-gcc_11-standard/portability-Dockerfile

-1
This file was deleted.

.github/workflows/dist.yml

+42-19
Original file line numberDiff line numberDiff line change
@@ -155,41 +155,48 @@ jobs:
155155
if: env.CAN_DEPLOY == 'true'
156156

157157
build_wheels:
158-
name: Build wheels on ${{ matrix.os }}, arch ${{ matrix.arch }}
158+
name: wheels ${{ matrix.build }}*_${{ matrix.arch }}
159159
runs-on: ${{ matrix.os }}
160160
needs: sdists_for_pypi
161161
strategy:
162162
fail-fast: false
163163
matrix:
164+
os: [ubuntu-latest]
165+
arch: [x86_64, i686, aarch64]
166+
build: [manylinux, musllinux]
164167
include:
165-
- os: ubuntu-latest
166-
arch: x86_64
167-
- os: ubuntu-latest
168-
arch: i686
169168
- os: macos-13
170169
arch: x86_64
170+
build: macosx
171171
- os: macos-14
172172
arch: arm64
173+
build: macosx
173174
env:
174175
CAN_DEPLOY: ${{ secrets.SAGEMATH_PYPI_API_TOKEN != '' }}
175176
# SPKGs to install as system packages
176177
SPKGS: _bootstrap _prereq
177178
# Non-Python packages to install as spkgs
178179
TARGETS_PRE: gmp mpfr mpc bliss coxeter3 mcqd meataxe sirocco boost_cropped tdlib
180+
CIBW_BUILD: "*${{ matrix.build }}*"
179181
# Disable building PyPy wheels on all platforms
180-
# Disable musllinux until #33083 provides alpine package information
181-
CIBW_SKIP: "pp* *-musllinux*"
182+
CIBW_SKIP: "pp*"
182183
#
183184
CIBW_ARCHS: ${{ matrix.arch }}
184185
# https://cibuildwheel.readthedocs.io/en/stable/options/#requires-python
185186
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9, <3.13"
186187
# Environment during wheel build
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"
188+
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 PIP_FIND_LINKS=file://$(pwd)/wheelhouse SAGE_NUM_THREADS=6"
188189
# Use 'build', not 'pip wheel'
189190
CIBW_BUILD_FRONTEND: build
190191
steps:
191192
- uses: actions/checkout@v4
192193

194+
- name: Set up QEMU
195+
if: runner.os == 'Linux' && matrix.arch != 'x86_64' && matrix.arch != 'i686'
196+
uses: docker/setup-qemu-action@v3
197+
with:
198+
platforms: all
199+
193200
- uses: actions/download-artifact@v4
194201
with:
195202
name: dist
@@ -209,7 +216,7 @@ jobs:
209216
eval $(sage-print-system-package-command auto --sudo --yes --no-install-recommends --spkg install _bootstrap)
210217
./bootstrap
211218
212-
- name: Build platform wheels
219+
- name: Unpack and prepare
213220
# We build the wheels from the sdists so that MANIFEST filtering becomes effective.
214221
# But we must run cibuildwheel with the unpacked source directory, not a tarball,
215222
# so that SAGE_ROOT is copied into the build containers.
@@ -223,21 +230,37 @@ jobs:
223230
#
224231
# omit sagemath-{meataxe,sirocco} for now -- needs sagemath-modules
225232
run: |
226-
"${{ steps.python.outputs.python-path }}" -m pip install pipx
233+
"${{ steps.python.outputs.python-path }}" -m pip install cibuildwheel==2.18.0
227234
export PATH=build/bin:$PATH
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"
235+
echo 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)) || $(sage-print-system-package-command alpine --yes --no-install-recommends install $(sage-get-system-packages alpine $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" >> "$GITHUB_ENV"
229236
mkdir -p unpacked
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
234-
(cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz
235-
"${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.18.0 unpacked/$pkg*
237+
for sdist in dist/$pkg*.tar.gz; do
238+
(cd unpacked && tar xfz - ) < $sdist
236239
done
237240
241+
- name: sagemath-objects
242+
run: |
243+
"${{ steps.python.outputs.python-path }}" -m cibuildwheel unpacked/sagemath*objects*
244+
245+
- name: sagemath-categories
246+
run: |
247+
"${{ steps.python.outputs.python-path }}" -m cibuildwheel unpacked/sagemath*categories*
248+
249+
- name: sagemath-bliss
250+
run: |
251+
"${{ steps.python.outputs.python-path }}" -m cibuildwheel unpacked/sagemath*bliss*
252+
253+
- name: sagemath-coxeter3
254+
run: |
255+
"${{ steps.python.outputs.python-path }}" -m cibuildwheel unpacked/sagemath*coxeter3*
256+
257+
- name: sagemath-mcqd
258+
run: |
259+
"${{ steps.python.outputs.python-path }}" -m cibuildwheel unpacked/sagemath*mcqd*
260+
238261
- uses: actions/upload-artifact@v4
239262
with:
240-
name: ${{ matrix.os }}-${{ matrix.arch }}-wheels
263+
name: ${{ matrix.os }}-${{ matrix.build }}-${{ matrix.arch }}-wheels
241264
path: ./wheelhouse/*.whl
242265

243266
upload_wheels:
@@ -250,7 +273,7 @@ jobs:
250273

251274
- uses: actions/download-artifact@v4
252275
with:
253-
pattern: "*-*-wheels"
276+
pattern: "*-*-*-wheels"
254277
path: wheelhouse
255278
merge-multiple: true
256279

0 commit comments

Comments
 (0)