diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 7e3f6b6ad62..f6eded733f8 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -166,7 +166,7 @@ jobs: arch: x86_64 - os: ubuntu-latest arch: i686 - - os: macos-latest + - os: macos-13 arch: x86_64 - os: macos-14 arch: arm64 @@ -175,16 +175,16 @@ jobs: # SPKGs to install as system packages SPKGS: _bootstrap _prereq # Non-Python packages to install as spkgs - TARGETS_PRE: gmpy2-build-deps + TARGETS_PRE: gmp mpfr mpc bliss coxeter3 mcqd meataxe sirocco boost_cropped tdlib # Disable building PyPy wheels on all platforms # Disable musllinux until #33083 provides alpine package information CIBW_SKIP: "pp* *-musllinux*" # CIBW_ARCHS: ${{ matrix.arch }} # https://cibuildwheel.readthedocs.io/en/stable/options/#requires-python - CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9, <3.12" + CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9, <3.13" # Environment during wheel build - 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" + 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" # Use 'build', not 'pip wheel' CIBW_BUILD_FRONTEND: build steps: @@ -203,6 +203,12 @@ jobs: python-version: "3.8 - 3.12" update-environment: false + - name: Bootstrap + run: | + export PATH=$(pwd)/build/bin:$PATH + eval $(sage-print-system-package-command auto --sudo --yes --no-install-recommends --spkg install _bootstrap) + ./bootstrap + - name: Build platform wheels # We build the wheels from the sdists so that MANIFEST filtering becomes effective. # But we must run cibuildwheel with the unpacked source directory, not a tarball, @@ -210,16 +216,23 @@ jobs: # # In the CIBW_BEFORE_ALL phase, we install libraries using the Sage distribution. # https://cibuildwheel.readthedocs.io/en/stable/options/#before-all - # This is unfortunately repeated for each of the packages that we build wheels for + # For Linux, this is repeated for each of the packages that we build wheels for # because CIBW starts with a fresh container on each invocation. + # Therefore we cache it in a directory mounted from the host: /host + # https://cibuildwheel.pypa.io/en/stable/faq/#linux-builds-in-containers + # + # omit sagemath-{meataxe,sirocco} for now -- needs sagemath-modules run: | "${{ steps.python.outputs.python-path }}" -m pip install pipx export PATH=build/bin:$PATH - 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" + 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" mkdir -p unpacked - for pkg in sagemath-objects sagemath-categories; do + for pkg in sagemath*objects sagemath*categories sagemath*bliss sagemath*coxeter3 sagemath*mcqd sagemath*tdlib; do + case "$pkg:${{ matrix.arch }}" in + sagemath*tdlib:i686) continue;; # broken - boost-related + esac (cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz - "${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.17.0 unpacked/$pkg* + "${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.18.0 unpacked/$pkg* done - uses: actions/upload-artifact@v4 diff --git a/build/pkgs/sagemath_tdlib/dependencies b/build/pkgs/sagemath_tdlib/dependencies index b22ab6c52a7..468986b44b0 100644 --- a/build/pkgs/sagemath_tdlib/dependencies +++ b/build/pkgs/sagemath_tdlib/dependencies @@ -1 +1 @@ - tdlib cysignals | $(PYTHON_TOOLCHAIN) sage_setup sagemath_environment cython pkgconfig $(PYTHON) + tdlib cysignals boost_cropped | $(PYTHON_TOOLCHAIN) sage_setup sagemath_environment cython pkgconfig $(PYTHON) diff --git a/build/pkgs/sirocco/dependencies b/build/pkgs/sirocco/dependencies new file mode 100644 index 00000000000..5bcf2cdfb19 --- /dev/null +++ b/build/pkgs/sirocco/dependencies @@ -0,0 +1 @@ +mpfr diff --git a/pkgs/sagemath-coxeter3/pyproject.toml.m4 b/pkgs/sagemath-coxeter3/pyproject.toml.m4 index 9f9c9dedd5e..58d4483f8bd 100644 --- a/pkgs/sagemath-coxeter3/pyproject.toml.m4 +++ b/pkgs/sagemath-coxeter3/pyproject.toml.m4 @@ -5,6 +5,7 @@ requires = [ SPKG_INSTALL_REQUIRES_setuptools SPKG_INSTALL_REQUIRES_sage_setup SPKG_INSTALL_REQUIRES_sagemath_environment + SPKG_INSTALL_REQUIRES_sagemath_objects SPKG_INSTALL_REQUIRES_cython SPKG_INSTALL_REQUIRES_cysignals SPKG_INSTALL_REQUIRES_pkgconfig diff --git a/pkgs/sagemath-meataxe/pyproject.toml.m4 b/pkgs/sagemath-meataxe/pyproject.toml.m4 index b4a504c4f1f..fdbcd55424f 100644 --- a/pkgs/sagemath-meataxe/pyproject.toml.m4 +++ b/pkgs/sagemath-meataxe/pyproject.toml.m4 @@ -5,6 +5,7 @@ requires = [ SPKG_INSTALL_REQUIRES_setuptools SPKG_INSTALL_REQUIRES_sage_setup SPKG_INSTALL_REQUIRES_sagemath_environment + SPKG_INSTALL_REQUIRES_sagemath_objects SPKG_INSTALL_REQUIRES_cython SPKG_INSTALL_REQUIRES_cysignals SPKG_INSTALL_REQUIRES_pkgconfig