From 241416a6315be1ea78695fc0569a78d863375b2c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 23 Oct 2023 14:56:34 -0700 Subject: [PATCH 01/21] .github/workflows/dist.yml: Also build wheels for sagemath-bliss etc. --- .github/workflows/dist.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 7e3f6b6ad62..538c869567e 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -175,7 +175,7 @@ jobs: # SPKGs to install as system packages SPKGS: _bootstrap _prereq # Non-Python packages to install as spkgs - TARGETS_PRE: gmpy2-build-deps + TARGETS_PRE: gmpy2-build-deps bliss coxeter3 mcqd meataxe sirocco tdlib # Disable building PyPy wheels on all platforms # Disable musllinux until #33083 provides alpine package information CIBW_SKIP: "pp* *-musllinux*" @@ -217,7 +217,7 @@ jobs: 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" 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-meataxe sagemath-sirocco sagemath-tdlib; do (cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz "${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.17.0 unpacked/$pkg* done From 384ac669edb967cadc64c0fd1c4dfc7fb0bd55f9 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 23 Oct 2023 17:01:34 -0700 Subject: [PATCH 02/21] build/pkgs/sirocco/dependencies: Add mpfr --- build/pkgs/sirocco/dependencies | 1 + 1 file changed, 1 insertion(+) create mode 100644 build/pkgs/sirocco/dependencies 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 From fc76bf5031277d0383a5487e8a05e5b5d02b4ef1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 23 Oct 2023 18:53:49 -0700 Subject: [PATCH 03/21] .github/workflows/dist.yml: Also build wheels for sagemath-bliss etc. (fixup) --- .github/workflows/dist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 538c869567e..e8feb15dbbe 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -215,7 +215,7 @@ jobs: 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) ) && ./bootstrap && ./configure --enable-build-as-root && MAKE='make -j4' make V=0 $TARGETS_PRE" mkdir -p unpacked for pkg in sagemath-objects sagemath-categories sagemath-bliss sagemath-coxeter3 sagemath-mcqd sagemath-meataxe sagemath-sirocco sagemath-tdlib; do (cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz From 6326377456f54e7629d0317463fa347a2544c994 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 20 Mar 2024 00:36:41 -0700 Subject: [PATCH 04/21] .github/workflows/dist.yml: Build gmp, mpfr, mpc from SPKG --- .github/workflows/dist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index e8feb15dbbe..5eb67ca804a 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -175,7 +175,7 @@ jobs: # SPKGs to install as system packages SPKGS: _bootstrap _prereq # Non-Python packages to install as spkgs - TARGETS_PRE: gmpy2-build-deps bliss coxeter3 mcqd meataxe sirocco tdlib + TARGETS_PRE: gmp mpfr mpc bliss coxeter3 mcqd meataxe sirocco tdlib # Disable building PyPy wheels on all platforms # Disable musllinux until #33083 provides alpine package information CIBW_SKIP: "pp* *-musllinux*" From 927a4be775950cec63fd0f25ec5ed053ae8df84e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 20 Mar 2024 00:37:27 -0700 Subject: [PATCH 05/21] .github/workflows/dist.yml: Update CIBW_PROJECT_REQUIRES_PYTHON --- .github/workflows/dist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 5eb67ca804a..9ecc2be99e1 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -182,7 +182,7 @@ jobs: # 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" # Use 'build', not 'pip wheel' From e7f19ef9c890c1f4ef70574ee3a42eeee0d46f73 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 20 Mar 2024 00:37:52 -0700 Subject: [PATCH 06/21] .github/workflows/dist.yml: Fix 'make -j' --- .github/workflows/dist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 9ecc2be99e1..374568272df 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -215,7 +215,7 @@ jobs: 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='make -j4' make 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) ) && ./bootstrap && ./configure --enable-build-as-root && MAKE=\"make -j6\" make V=0 $TARGETS_PRE" mkdir -p unpacked for pkg in sagemath-objects sagemath-categories sagemath-bliss sagemath-coxeter3 sagemath-mcqd sagemath-meataxe sagemath-sirocco sagemath-tdlib; do (cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz From f86d2cf0f3b3d3f8360cf7a1b325b383a545fd26 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 12 May 2024 12:42:16 -0700 Subject: [PATCH 07/21] .github/workflows/dist.yml (build_wheels): Use PIP_CONSTRAINT for sage-conf, sage-setup --- .github/workflows/dist.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 374568272df..7d97f6bde92 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -184,7 +184,7 @@ jobs: # https://cibuildwheel.readthedocs.io/en/stable/options/#requires-python 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)/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 PIP_CONSTRAINT=$(pwd)/constraints.txt" # Use 'build', not 'pip wheel' CIBW_BUILD_FRONTEND: build steps: @@ -215,7 +215,7 @@ jobs: 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=\"make -j6\" make 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) ) && ./bootstrap && ./configure --enable-build-as-root && 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 sagemath-bliss sagemath-coxeter3 sagemath-mcqd sagemath-meataxe sagemath-sirocco sagemath-tdlib; do (cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz From 0e0b0fdffd10c5747a0168ce4c8dd142e8cd8328 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 12 May 2024 12:42:16 -0700 Subject: [PATCH 08/21] dist.yml (Build platform wheels): Relax filename pattern --- .github/workflows/dist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 7d97f6bde92..b5574057685 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -217,7 +217,7 @@ jobs: 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=\"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 sagemath-bliss sagemath-coxeter3 sagemath-mcqd sagemath-meataxe sagemath-sirocco sagemath-tdlib; do + for pkg in sagemath*objects sagemath*categories sagemath*bliss sagemath*coxeter3 sagemath*mcqd sagemath*meataxe sagemath*sirocco sagemath*tdlib; do (cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz "${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.17.0 unpacked/$pkg* done From 3180327fada5e061c8272dd6e13b676a3734de3d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 14 May 2024 00:34:28 -0700 Subject: [PATCH 09/21] dist.yml (Build platform wheels): Build x86_64 using macos-13 image --- .github/workflows/dist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index b5574057685..00158dce13d 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 From 518e24cba46ca256a796989265b189557620e849 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 14 May 2024 00:41:41 -0700 Subject: [PATCH 10/21] dist.yml (Build platform wheels): Quoting fix in CIBW_BEFORE_ALL --- .github/workflows/dist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 00158dce13d..5824f7de8d7 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -215,7 +215,7 @@ jobs: 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=\"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" + 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=\"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 sagemath*bliss sagemath*coxeter3 sagemath*mcqd sagemath*meataxe sagemath*sirocco sagemath*tdlib; do (cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz From c403931de229af9d561f2ab64791f7ca02b0cb3a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 14 May 2024 14:23:16 -0700 Subject: [PATCH 11/21] pkgs/sagemath-coxeter3/pyproject.toml.m4: Add build requirement sagemath-objects --- pkgs/sagemath-coxeter3/pyproject.toml.m4 | 1 + 1 file changed, 1 insertion(+) 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 From 7c54971b4e1099dd096916fce48c673b9aab6894 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 14 May 2024 15:06:39 -0700 Subject: [PATCH 12/21] dist.yml (Build platform wheels Linux): Use --prefix in /host --- .github/workflows/dist.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 5824f7de8d7..0a3ff4dff43 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -184,7 +184,7 @@ jobs: # https://cibuildwheel.readthedocs.io/en/stable/options/#requires-python 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 PIP_CONSTRAINT=$(pwd)/constraints.txt" + CIBW_ENVIRONMENT: "PATH=$(pwd)/prefix/bin:$PATH CPATH=$(pwd)/prefix/include:$CPATH LIBRARY_PATH=$(pwd)/prefix/lib:$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: @@ -207,15 +207,18 @@ jobs: # 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, # so that SAGE_ROOT is copied into the build containers. + # TODO: Not true any more since https://cibuildwheel.pypa.io/en/stable/changelog/#v250 # # 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 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=\"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" + 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 ${{ startsWith(matrix.os, 'ubuntu') && format('--prefix=/host/sage-{0}', matrix.arch) || '' }} && 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 sagemath*bliss sagemath*coxeter3 sagemath*mcqd sagemath*meataxe sagemath*sirocco sagemath*tdlib; do (cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz From 975b414bbab46992fe40798073f67ce3c4c9baac Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 14 May 2024 16:21:04 -0700 Subject: [PATCH 13/21] dist.yml (Build platform wheels Linux): Use --prefix in /host (fixup) --- .github/workflows/dist.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 0a3ff4dff43..37f4a435d3c 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -207,7 +207,6 @@ jobs: # 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, # so that SAGE_ROOT is copied into the build containers. - # TODO: Not true any more since https://cibuildwheel.pypa.io/en/stable/changelog/#v250 # # In the CIBW_BEFORE_ALL phase, we install libraries using the Sage distribution. # https://cibuildwheel.readthedocs.io/en/stable/options/#before-all @@ -218,11 +217,11 @@ jobs: 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 ${{ startsWith(matrix.os, 'ubuntu') && format('--prefix=/host/sage-{0}', matrix.arch) || '' }} && 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" + 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 ${{ startsWith(matrix.os, 'ubuntu') && \"--prefix=/host/sage-\$AUDITWHEEL_PLAT\"' || '' }} && 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 sagemath*bliss sagemath*coxeter3 sagemath*mcqd sagemath*meataxe sagemath*sirocco sagemath*tdlib; do (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 From 7ef357f40706a8e7e8e9115b2eaa849326296314 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 14 May 2024 17:44:42 -0700 Subject: [PATCH 14/21] pkgs/sagemath-meataxe/pyproject.toml.m4: Add build requirement sagemath-objects --- pkgs/sagemath-meataxe/pyproject.toml.m4 | 1 + 1 file changed, 1 insertion(+) 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 From c6f25f0926ab0690619b515107e83ac873da23f5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 14 May 2024 17:45:22 -0700 Subject: [PATCH 15/21] dist.yml (Build platform wheels Linux): Run bootstrap outside of the containers --- .github/workflows/dist.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 37f4a435d3c..8c72eb6de71 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -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, @@ -217,7 +223,7 @@ jobs: 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 ${{ startsWith(matrix.os, 'ubuntu') && \"--prefix=/host/sage-\$AUDITWHEEL_PLAT\"' || '' }} && 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" + 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 sagemath*bliss sagemath*coxeter3 sagemath*mcqd sagemath*meataxe sagemath*sirocco sagemath*tdlib; do (cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz From 1681086ece989cbff0f9ddec4b5c78c7883e9117 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 14 May 2024 19:34:55 -0700 Subject: [PATCH 16/21] dist.yml (Build platform wheels Linux): Set LD_LIBRARY_PATH for auditwheel --- .github/workflows/dist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 8c72eb6de71..9156f31f99d 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -184,7 +184,7 @@ jobs: # https://cibuildwheel.readthedocs.io/en/stable/options/#requires-python CIBW_PROJECT_REQUIRES_PYTHON: ">=3.9, <3.13" # Environment during wheel build - CIBW_ENVIRONMENT: "PATH=$(pwd)/prefix/bin:$PATH CPATH=$(pwd)/prefix/include:$CPATH LIBRARY_PATH=$(pwd)/prefix/lib:$LIBRARY_PATH PKG_CONFIG_PATH=$(pwd)/prefix/share/pkgconfig:$PKG_CONFIG_PATH ACLOCAL_PATH=/usr/share/aclocal PIP_CONSTRAINT=$(pwd)/constraints.txt" + 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: From d086b9baec3089a18c99e547c6eb2aa458c8d418 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 14 May 2024 19:35:01 -0700 Subject: [PATCH 17/21] dist.yml (Build platform wheels): Omit sagemath-meataxe --- .github/workflows/dist.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 9156f31f99d..4fadbceda9e 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -220,12 +220,14 @@ jobs: # 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 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) ) && 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 sagemath*bliss sagemath*coxeter3 sagemath*mcqd sagemath*meataxe sagemath*sirocco sagemath*tdlib; do + for pkg in sagemath*objects sagemath*categories sagemath*bliss sagemath*coxeter3 sagemath*mcqd sagemath*sirocco sagemath*tdlib; do (cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz "${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.18.0 unpacked/$pkg* done From 946cc5904c37e81adab23e7a62fc8035480f910e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 14 May 2024 20:17:42 -0700 Subject: [PATCH 18/21] dist.yml (Build platform wheels): Omit sagemath-sirocco --- .github/workflows/dist.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 4fadbceda9e..0b72405bda9 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -221,13 +221,13 @@ jobs: # 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 for now -- needs sagemath-modules + # 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) ) && 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 sagemath*bliss sagemath*coxeter3 sagemath*mcqd sagemath*sirocco sagemath*tdlib; do + for pkg in sagemath*objects sagemath*categories sagemath*bliss sagemath*coxeter3 sagemath*mcqd sagemath*tdlib; do (cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz "${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.18.0 unpacked/$pkg* done From 8f025b6209d47eb27ec93c053c17317601f0ed25 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 14 May 2024 21:10:58 -0700 Subject: [PATCH 19/21] build/pkgs/sagemath_tdlib/dependencies: Add boost_cropped --- build/pkgs/sagemath_tdlib/dependencies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) From 6cbb700ef65590e6cd3202b746000998c3d67d57 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 15 May 2024 00:40:11 -0700 Subject: [PATCH 20/21] dist.yml (Build platform wheels): Add boost_cropped for sagemath-tdlib --- .github/workflows/dist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 0b72405bda9..6584b461ea3 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -175,7 +175,7 @@ jobs: # SPKGs to install as system packages SPKGS: _bootstrap _prereq # Non-Python packages to install as spkgs - TARGETS_PRE: gmp mpfr mpc bliss coxeter3 mcqd meataxe sirocco tdlib + 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*" From 2b2bbb2b11ad3fd1f48f2261e53aeffe2e2cab3b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 15 May 2024 11:11:35 -0700 Subject: [PATCH 21/21] dist.yml (Build platform wheels) [i686]: Skip sagemath-tdlib --- .github/workflows/dist.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 6584b461ea3..f6eded733f8 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -228,6 +228,9 @@ jobs: 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 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.18.0 unpacked/$pkg* done