diff --git a/.devcontainer/onCreate-meson.sh b/.devcontainer/onCreate-meson.sh index f5cd7e837d1..1a1c27735d2 100755 --- a/.devcontainer/onCreate-meson.sh +++ b/.devcontainer/onCreate-meson.sh @@ -21,9 +21,10 @@ uv pip install \ meson-python \ "cypari2 >=2.2.1" \ "cysignals >=1.11.2, != 1.12.0" \ - "cython >=3.0, != 3.0.3" \ + "cython >=3.0, != 3.0.3, < 3.1.0" \ "gmpy2 ~=2.1.b999" \ memory_allocator \ "numpy >=1.25" \ - jinja2 -uv sync --frozen --inexact --no-build-isolation-package=sagemath + jinja2 \ + setuptools +uv sync --frozen --inexact --no-build-isolation --config-settings=builddir=build/build-$SYSTEM diff --git a/.devcontainer/portability-archlinux-latest-minimal/devcontainer.json b/.devcontainer/portability-archlinux-latest-minimal/devcontainer.json deleted file mode 100644 index bf1114bf9e1..00000000000 --- a/.devcontainer/portability-archlinux-latest-minimal/devcontainer.json +++ /dev/null @@ -1,25 +0,0 @@ -// The command "tox -e update_docker_platforms" -// creates .devcontainer/portability-*-*/devcontainer.json -// from .devcontainer/portability-devcontainer.json.in -// See https://aka.ms/devcontainer.json for format details. -{ - "name": "archlinux-latest-minimal (≥ 8-core)", - "build": { - "dockerfile": "portability-Dockerfile", - // See tox.ini for definitions - "args": { - "SYSTEM_FACTOR": "archlinux-latest", - "PACKAGE_FACTOR": "minimal", - "DOCKER_TARGET": "with-targets", - "DOCKER_TAG": "dev" - } - }, - "containerEnv": { - "MAKE": "make -j4" - }, - "onCreateCommand": ".devcontainer/onCreate.sh", - "updateContentCommand": ".devcontainer/portability-updateContent.sh", - "extensions": [ - "ms-python.python" - ] -} diff --git a/.devcontainer/portability-archlinux-latest-minimal/portability-Dockerfile b/.devcontainer/portability-archlinux-latest-minimal/portability-Dockerfile deleted file mode 120000 index 692e2a79d64..00000000000 --- a/.devcontainer/portability-archlinux-latest-minimal/portability-Dockerfile +++ /dev/null @@ -1 +0,0 @@ -../portability-Dockerfile \ No newline at end of file diff --git a/.devcontainer/portability-archlinux-latest-standard/devcontainer.json b/.devcontainer/portability-archlinux-latest-standard/devcontainer.json deleted file mode 100644 index 9361033542c..00000000000 --- a/.devcontainer/portability-archlinux-latest-standard/devcontainer.json +++ /dev/null @@ -1,25 +0,0 @@ -// The command "tox -e update_docker_platforms" -// creates .devcontainer/portability-*-*/devcontainer.json -// from .devcontainer/portability-devcontainer.json.in -// See https://aka.ms/devcontainer.json for format details. -{ - "name": "archlinux-latest-standard (≥ 8-core)", - "build": { - "dockerfile": "portability-Dockerfile", - // See tox.ini for definitions - "args": { - "SYSTEM_FACTOR": "archlinux-latest", - "PACKAGE_FACTOR": "standard", - "DOCKER_TARGET": "with-targets", - "DOCKER_TAG": "dev" - } - }, - "containerEnv": { - "MAKE": "make -j4" - }, - "onCreateCommand": ".devcontainer/onCreate.sh", - "updateContentCommand": ".devcontainer/portability-updateContent.sh", - "extensions": [ - "ms-python.python" - ] -} diff --git a/.devcontainer/portability-archlinux-latest-standard/portability-Dockerfile b/.devcontainer/portability-archlinux-latest-standard/portability-Dockerfile deleted file mode 120000 index 692e2a79d64..00000000000 --- a/.devcontainer/portability-archlinux-latest-standard/portability-Dockerfile +++ /dev/null @@ -1 +0,0 @@ -../portability-Dockerfile \ No newline at end of file diff --git a/.devcontainer/portability-archlinux/Dockerfile b/.devcontainer/portability-archlinux/Dockerfile new file mode 100644 index 00000000000..958e3d63a9e --- /dev/null +++ b/.devcontainer/portability-archlinux/Dockerfile @@ -0,0 +1,2 @@ +FROM archlinux +RUN pacman -Syu --noconfirm bash git python diff --git a/.devcontainer/portability-archlinux/devcontainer.json b/.devcontainer/portability-archlinux/devcontainer.json new file mode 100644 index 00000000000..f076a199e67 --- /dev/null +++ b/.devcontainer/portability-archlinux/devcontainer.json @@ -0,0 +1,23 @@ +// See https://aka.ms/devcontainer.json for format details. +{ + "name": "archlinux", + //"image": "archlinux", + "dockerFile": "Dockerfile", + "onCreateCommand": ".devcontainer/onCreate-meson.sh || true", + "features": { + // Git feature is not compatible with Arch Linux, so we install it manually in the Dockerfile + // https://github.com/devcontainers/features/issues/824 + //"ghcr.io/devcontainers/features/git": {}, + //"ghcr.io/devcontainers/features/python:1": {}, + "../uv": { + "version": "latest" + } + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python" + ] + } + } +} diff --git a/.devcontainer/portability-void/Dockerfile b/.devcontainer/portability-void/Dockerfile new file mode 100644 index 00000000000..9a3c7f32685 --- /dev/null +++ b/.devcontainer/portability-void/Dockerfile @@ -0,0 +1,3 @@ +FROM ghcr.io/void-linux/void-glibc-full +RUN xbps-install -Suy bash git python +RUN chsh -s /usr/bin/bash diff --git a/.devcontainer/portability-void/devcontainer.json b/.devcontainer/portability-void/devcontainer.json new file mode 100644 index 00000000000..3024093fcd8 --- /dev/null +++ b/.devcontainer/portability-void/devcontainer.json @@ -0,0 +1,24 @@ +// See https://aka.ms/devcontainer.json for format details. +{ + "name": "void", + // Doesn't include 'bash', so we use a custom dockerfile + // "image": "ghcr.io/void-linux/void-glibc-full", + "dockerFile": "Dockerfile", + "onCreateCommand": ".devcontainer/onCreate-meson.sh || true", + "features": { + // Git feature is not compatible with Void Linux, so we install it manually in the Dockerfile + // https://github.com/devcontainers/features/issues/824 + //"ghcr.io/devcontainers/features/git": {}, + //"ghcr.io/devcontainers/features/python:1": {}, + "../uv": { + "version": "latest" + } + }, + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python" + ] + } + } +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41540e8bfca..983baa03fc7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,7 @@ on: paths: - '**.build' - 'subprojects/**' + - '.github/workflows/ci.yml' workflow_dispatch: # Allow to run manually @@ -21,10 +22,26 @@ jobs: container: - fedora:41 - fedora:42 + - ghcr.io/void-linux/void-glibc-full + - archlinux container: image: ${{ matrix.container }} steps: + - name: Prepare container + run: | + if [ "${{ matrix.container }}" = "ghcr.io/void-linux/void-glibc-full" ]; then + xbps-install -Syu xbps + xbps-install -yu + # node-based actions require libstdc++.so.6 + xbps-install -Sy libstdc++ bash git + fi + if [ "${{ matrix.container }}" = "archlinux" ]; then + # The archlinux container is configured to not install docs by default + # but we need the maxima help to be in place + sed -i '/^NoExtract/d' /etc/pacman.conf + fi + - name: Checkout code # cannot use v4 yet because of https://github.com/actions/checkout/issues/1487 uses: actions/checkout@v3 @@ -37,7 +54,11 @@ jobs: - name: Set up Python run: | uv python install - uv venv + if [ "${{ matrix.container }}" = "ghcr.io/void-linux/void-glibc-full" ] || [ "${{ matrix.container }}" = "archlinux" ]; then + uv venv --system-site-packages + else + uv venv + fi . .venv/bin/activate echo PATH=$PATH >> $GITHUB_ENV @@ -65,15 +86,15 @@ jobs: meson-python \ "cypari2 >=2.2.1" \ "cysignals >=1.11.2, != 1.12.0" \ - "cython >=3.0, != 3.0.3" \ + "cython >=3.0, != 3.0.3, < 3.1.0" \ "gmpy2 ~=2.1.b999" \ memory_allocator \ "numpy >=1.25" \ - jinja2 - - uv sync --frozen --inexact --no-build-isolation-package=sagemath + jinja2 \ + setuptools + uv sync --frozen --inexact --no-build-isolation -v - name: Test run: | - uv run ./sage -t --all -p4 || true + uv run --frozen ./sage -t --all -p4 || true \ No newline at end of file diff --git a/build/bin/sage-print-system-package-command b/build/bin/sage-print-system-package-command index f561f1e4436..b17b5e864f7 100755 --- a/build/bin/sage-print-system-package-command +++ b/build/bin/sage-print-system-package-command @@ -171,7 +171,7 @@ case $system:$command in fi ;; void*:update) - print_shell_command "${SUDO}xbps-install -Su" + print_shell_command "${SUDO}xbps-install -Suy" ;; void*:install) [ "$YES" = yes ] && options="$options --yes" diff --git a/build/pkgs/ecm/distros/arch.txt b/build/pkgs/ecm/distros/arch.txt new file mode 100644 index 00000000000..71377f447e3 --- /dev/null +++ b/build/pkgs/ecm/distros/arch.txt @@ -0,0 +1 @@ +gmp-ecm diff --git a/build/pkgs/elliptic_curves/arch.txt b/build/pkgs/elliptic_curves/distros/arch.txt similarity index 100% rename from build/pkgs/elliptic_curves/arch.txt rename to build/pkgs/elliptic_curves/distros/arch.txt diff --git a/build/pkgs/elliptic_curves/distros/void.txt b/build/pkgs/elliptic_curves/distros/void.txt new file mode 100644 index 00000000000..964d3ac1d40 --- /dev/null +++ b/build/pkgs/elliptic_curves/distros/void.txt @@ -0,0 +1 @@ +sage-data-elliptic_curves diff --git a/build/pkgs/gap/distros/void.txt b/build/pkgs/gap/distros/void.txt new file mode 100644 index 00000000000..967de728af6 --- /dev/null +++ b/build/pkgs/gap/distros/void.txt @@ -0,0 +1 @@ +gap-devel diff --git a/build/pkgs/mpfi/distros/arch.txt b/build/pkgs/mpfi/distros/arch.txt new file mode 100644 index 00000000000..0508439baac --- /dev/null +++ b/build/pkgs/mpfi/distros/arch.txt @@ -0,0 +1 @@ +mpfi diff --git a/src/meson.build b/src/meson.build index fe627fc760f..03278a32c34 100644 --- a/src/meson.build +++ b/src/meson.build @@ -150,7 +150,7 @@ zlib = dependency('zlib', version: '>=1.2.11') # https://github.com/conda-forge/eclib-feedstock/issues/48 ec = dependency('eclib', version: '>=20231211', required: false, disabler: true) # Cannot be found via pkg-config -ec = cc.find_library('ec', required: not is_windows, disabler: true) +ec = cc.find_library('ec', required: false, disabler: true) ecm = cc.find_library('ecm', required: not is_windows, disabler: true) gmpxx = dependency('gmpxx', required: not is_windows, disabler: true) fflas = dependency(