From aa9bbd47e9b5c93d720b9ecd60bf4f9fc52ecb42 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 2 Feb 2024 11:25:27 -0800 Subject: [PATCH 01/12] pyproject.toml: Move settings of CIBW_TEST_COMMAND here --- .github/workflows/buildwheel.yml | 1 - bin/cibw.bat | 1 - bin/cibw.sh | 3 +-- pyproject.toml | 3 +++ 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 89a35eac..da62f401 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -50,7 +50,6 @@ jobs: PYTHON_FLINT_MINGW64=true CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >- bin\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel} - CIBW_TEST_COMMAND: python -c "import flint; print(str(flint.fmpz(2)))" - uses: actions/upload-artifact@v4 with: diff --git a/bin/cibw.bat b/bin/cibw.bat index a21ebb6d..e2b5be38 100644 --- a/bin/cibw.bat +++ b/bin/cibw.bat @@ -27,6 +27,5 @@ set CIBW_BEFORE_ALL_WINDOWS=C:\msys64\usr\bin\bash bin/cibw_before_all_windows.s set CIBW_BEFORE_BUILD_WINDOWS=C:\msys64\usr\bin\bash bin/cibw_before_build_windows.sh set CIBW_ENVIRONMENT=PYTHON_FLINT_MINGW64=true set CIBW_REPAIR_WHEEL_COMMAND_WINDOWS=bin\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel} -set CIBW_TEST_COMMAND=python -c "import flint; print(str(flint.fmpz(2)))" cibuildwheel --platform windows diff --git a/bin/cibw.sh b/bin/cibw.sh index a62de6f3..c35b194a 100755 --- a/bin/cibw.sh +++ b/bin/cibw.sh @@ -28,8 +28,7 @@ export CIBW_BEFORE_BUILD_WINDOWS='C:\\msys64\\usr\\bin\\bash bin/cibw_before_bui export CIBW_REPAIR_WHEEL_COMMAND_WINDOWS='bin\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}' -# export CIBW_TEST_COMMAND="python -c 'import flint; print(str(flint.fmpz(2)))'" -export CIBW_TEST_COMMAND="python -m flint.test" +export CIBW_TEST_COMMAND="python -m flint.test" # override setting in pyproject.toml # cibuildwheel --platform linux # cibuildwheel --platform windows diff --git a/pyproject.toml b/pyproject.toml index e5bd0307..4f517ad0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,3 +20,6 @@ classifiers = [ [project.readme] file = "README.md" content-type = "text/markdown" + +[tool.cibuildwheel] +test-command = "python -c \"import flint; print(str(flint.fmpz(2)))\"" From b2f1954c625d1a789cfea7658e909310ee2220bd Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 2 Feb 2024 12:16:32 -0800 Subject: [PATCH 02/12] pyproject.toml: Move settings of CIBW_REPAIR_WHEEL_COMMAND_WINDOWS here --- .github/workflows/buildwheel.yml | 2 -- bin/cibw.bat | 1 - bin/cibw.sh | 2 -- pyproject.toml | 7 +++++++ 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index da62f401..0e893361 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -48,8 +48,6 @@ jobs: LIBRARY_PATH=$(pwd)/.local/lib/ LD_LIBRARY_PATH=$(pwd)/.local/lib:$LD_LIBRARY_PATH PYTHON_FLINT_MINGW64=true - CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >- - bin\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel} - uses: actions/upload-artifact@v4 with: diff --git a/bin/cibw.bat b/bin/cibw.bat index e2b5be38..37f27de4 100644 --- a/bin/cibw.bat +++ b/bin/cibw.bat @@ -26,6 +26,5 @@ set CIBW_SKIP=*-win32 *-manylinux_i686 *-musllinux_* set CIBW_BEFORE_ALL_WINDOWS=C:\msys64\usr\bin\bash bin/cibw_before_all_windows.sh set CIBW_BEFORE_BUILD_WINDOWS=C:\msys64\usr\bin\bash bin/cibw_before_build_windows.sh set CIBW_ENVIRONMENT=PYTHON_FLINT_MINGW64=true -set CIBW_REPAIR_WHEEL_COMMAND_WINDOWS=bin\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel} cibuildwheel --platform windows diff --git a/bin/cibw.sh b/bin/cibw.sh index c35b194a..956b501f 100755 --- a/bin/cibw.sh +++ b/bin/cibw.sh @@ -26,8 +26,6 @@ export CIBW_BEFORE_ALL_WINDOWS='C:\\msys64\\usr\\bin\\bash bin/cibw_before_all_w export CIBW_BEFORE_BUILD='pip install numpy cython delvewheel' export CIBW_BEFORE_BUILD_WINDOWS='C:\\msys64\\usr\\bin\\bash bin/cibw_before_build_windows.sh' -export CIBW_REPAIR_WHEEL_COMMAND_WINDOWS='bin\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}' - export CIBW_TEST_COMMAND="python -m flint.test" # override setting in pyproject.toml # cibuildwheel --platform linux diff --git a/pyproject.toml b/pyproject.toml index 4f517ad0..62dbad3b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,3 +23,10 @@ content-type = "text/markdown" [tool.cibuildwheel] test-command = "python -c \"import flint; print(str(flint.fmpz(2)))\"" + +[tool.cibuildwheel.linux] + +[tool.cibuildwheel.macos] + +[tool.cibuildwheel.windows] +repair-wheel-command = "bin\\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}" From 3a761317067f3f0355e5b914592aba1f49f372fc Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 2 Feb 2024 11:40:02 -0800 Subject: [PATCH 03/12] pyproject.toml: Move settings of CIBW_ENVIRONMENT variable PYTHON_FLINT_MINGW64 here --- .github/workflows/buildwheel.yml | 1 - bin/cibw.bat | 1 - bin/cibw.sh | 2 +- pyproject.toml | 1 + 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 0e893361..cc9631a4 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -47,7 +47,6 @@ jobs: C_INCLUDE_PATH=$(pwd)/.local/include/ LIBRARY_PATH=$(pwd)/.local/lib/ LD_LIBRARY_PATH=$(pwd)/.local/lib:$LD_LIBRARY_PATH - PYTHON_FLINT_MINGW64=true - uses: actions/upload-artifact@v4 with: diff --git a/bin/cibw.bat b/bin/cibw.bat index 37f27de4..18759588 100644 --- a/bin/cibw.bat +++ b/bin/cibw.bat @@ -25,6 +25,5 @@ set CIBW_BUILD=cp39-* cp310-* cp311-* set CIBW_SKIP=*-win32 *-manylinux_i686 *-musllinux_* set CIBW_BEFORE_ALL_WINDOWS=C:\msys64\usr\bin\bash bin/cibw_before_all_windows.sh set CIBW_BEFORE_BUILD_WINDOWS=C:\msys64\usr\bin\bash bin/cibw_before_build_windows.sh -set CIBW_ENVIRONMENT=PYTHON_FLINT_MINGW64=true cibuildwheel --platform windows diff --git a/bin/cibw.sh b/bin/cibw.sh index 956b501f..4a673064 100755 --- a/bin/cibw.sh +++ b/bin/cibw.sh @@ -9,7 +9,7 @@ rm -f wheelhouse/* # bin/build_dependencies_unix.sh places headers and shared libraries under .local -export CIBW_ENVIRONMENT='C_INCLUDE_PATH=$(pwd)/.local/include/ LIBRARY_PATH=$(pwd)/.local/lib/ LD_LIBRARY_PATH=$(pwd)/.local/lib:$LD_LIBRARY_PATH PYTHON_FLINT_MINGW64=true' +export CIBW_ENVIRONMENT='C_INCLUDE_PATH=$(pwd)/.local/include/ LIBRARY_PATH=$(pwd)/.local/lib/ LD_LIBRARY_PATH=$(pwd)/.local/lib:$LD_LIBRARY_PATH' export CIBW_BUILD='cp39-* cp310-* cp311-* cp312-*' # export CIBW_BUILD='cp311-*' diff --git a/pyproject.toml b/pyproject.toml index 62dbad3b..a80c87a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,4 +29,5 @@ test-command = "python -c \"import flint; print(str(flint.fmpz(2)))\"" [tool.cibuildwheel.macos] [tool.cibuildwheel.windows] +environment = { PYTHON_FLINT_MINGW64="true" } repair-wheel-command = "bin\\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}" From 34df9b36a43f5d09f91364d1cd8068858f04b13f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 2 Feb 2024 11:44:55 -0800 Subject: [PATCH 04/12] pyproject.toml: Move settings of CIBW_ENVIRONMENT variables here --- .github/workflows/buildwheel.yml | 4 ---- bin/cibw.sh | 3 --- pyproject.toml | 10 +++++++++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index cc9631a4..5be944df 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -43,10 +43,6 @@ jobs: CIBW_BEFORE_ALL_WINDOWS: msys2 -c bin/cibw_before_all_windows.sh CIBW_BEFORE_BUILD_WINDOWS: msys2 -c bin/cibw_before_build_windows.sh CIBW_BEFORE_BUILD: pip install numpy setuptools cython delvewheel - CIBW_ENVIRONMENT: > - C_INCLUDE_PATH=$(pwd)/.local/include/ - LIBRARY_PATH=$(pwd)/.local/lib/ - LD_LIBRARY_PATH=$(pwd)/.local/lib:$LD_LIBRARY_PATH - uses: actions/upload-artifact@v4 with: diff --git a/bin/cibw.sh b/bin/cibw.sh index 4a673064..444f162a 100755 --- a/bin/cibw.sh +++ b/bin/cibw.sh @@ -8,9 +8,6 @@ rm -f wheelhouse/* -# bin/build_dependencies_unix.sh places headers and shared libraries under .local -export CIBW_ENVIRONMENT='C_INCLUDE_PATH=$(pwd)/.local/include/ LIBRARY_PATH=$(pwd)/.local/lib/ LD_LIBRARY_PATH=$(pwd)/.local/lib:$LD_LIBRARY_PATH' - export CIBW_BUILD='cp39-* cp310-* cp311-* cp312-*' # export CIBW_BUILD='cp311-*' export CIBW_SKIP='*-win32 *-manylinux_i686 *-musllinux_*' diff --git a/pyproject.toml b/pyproject.toml index a80c87a8..12fae9ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,10 +24,18 @@ content-type = "text/markdown" [tool.cibuildwheel] test-command = "python -c \"import flint; print(str(flint.fmpz(2)))\"" +[tool.cibuildwheel.environment] +# bin/build_dependencies_unix.sh places headers and shared libraries under .local +C_INCLUDE_PATH = "$(pwd)/.local/include/" +LIBRARY_PATH = "$(pwd)/.local/lib/" +LD_LIBRARY_PATH = "$(pwd)/.local/lib:$LD_LIBRARY_PATH" + [tool.cibuildwheel.linux] [tool.cibuildwheel.macos] [tool.cibuildwheel.windows] -environment = { PYTHON_FLINT_MINGW64="true" } repair-wheel-command = "bin\\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}" + +[tool.cibuildwheel.windows.environment] +PYTHON_FLINT_MINGW64 = "true" From f0b60cca58b2b4e3ba845f7c26aa380f0702acd5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 2 Feb 2024 11:49:18 -0800 Subject: [PATCH 05/12] pyproject.toml: Move settings of CIBW_BEFORE_ALL_LINUX here --- .github/workflows/buildwheel.yml | 1 - bin/cibw.sh | 1 - pyproject.toml | 1 + 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 5be944df..2b0b837b 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -38,7 +38,6 @@ jobs: CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux_*" CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_MANYLINUX_I686_IMAGE: manylinux2014 - CIBW_BEFORE_ALL_LINUX: bin/cibw_before_all_linux.sh CIBW_BEFORE_ALL_MACOS: bin/cibw_before_all_macosx_x86_64.sh CIBW_BEFORE_ALL_WINDOWS: msys2 -c bin/cibw_before_all_windows.sh CIBW_BEFORE_BUILD_WINDOWS: msys2 -c bin/cibw_before_build_windows.sh diff --git a/bin/cibw.sh b/bin/cibw.sh index 444f162a..56eef3a2 100755 --- a/bin/cibw.sh +++ b/bin/cibw.sh @@ -15,7 +15,6 @@ export CIBW_SKIP='*-win32 *-manylinux_i686 *-musllinux_*' # export CIBW_ARCHS_MACOS="x86_64" export CIBW_ARCHS_MACOS="arm64" -export CIBW_BEFORE_ALL_LINUX=bin/cibw_before_all_linux.sh # export CIBW_BEFORE_ALL_MACOS=bin/cibw_before_all_macosx_x86_64.sh export CIBW_BEFORE_ALL_MACOS=bin/cibw_before_all_macosx_arm64.sh export CIBW_BEFORE_ALL_WINDOWS='C:\\msys64\\usr\\bin\\bash bin/cibw_before_all_windows.sh' diff --git a/pyproject.toml b/pyproject.toml index 12fae9ba..15ffd647 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,7 @@ LIBRARY_PATH = "$(pwd)/.local/lib/" LD_LIBRARY_PATH = "$(pwd)/.local/lib:$LD_LIBRARY_PATH" [tool.cibuildwheel.linux] +before-all = "bin/cibw_before_all_linux.sh" [tool.cibuildwheel.macos] From 8f14c051fbcc13f154115421573da42e3af366f9 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 2 Feb 2024 12:16:58 -0800 Subject: [PATCH 06/12] pyproject.toml: Move settings of CIBW_BUILD here --- .github/workflows/buildwheel.yml | 1 - bin/cibw.bat | 2 ++ bin/cibw.sh | 2 -- pyproject.toml | 1 + 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 2b0b837b..f155c4e6 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -34,7 +34,6 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.16.5 env: - CIBW_BUILD: cp39-* cp310-* cp311-* cp312-* CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux_*" CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_MANYLINUX_I686_IMAGE: manylinux2014 diff --git a/bin/cibw.bat b/bin/cibw.bat index 18759588..9a6c3e52 100644 --- a/bin/cibw.bat +++ b/bin/cibw.bat @@ -21,7 +21,9 @@ rem wheels from a previous run so we delete them here. rem del /q wheelhouse\* +rem override setting in pyproject.toml set CIBW_BUILD=cp39-* cp310-* cp311-* + set CIBW_SKIP=*-win32 *-manylinux_i686 *-musllinux_* set CIBW_BEFORE_ALL_WINDOWS=C:\msys64\usr\bin\bash bin/cibw_before_all_windows.sh set CIBW_BEFORE_BUILD_WINDOWS=C:\msys64\usr\bin\bash bin/cibw_before_build_windows.sh diff --git a/bin/cibw.sh b/bin/cibw.sh index 56eef3a2..94229899 100755 --- a/bin/cibw.sh +++ b/bin/cibw.sh @@ -8,8 +8,6 @@ rm -f wheelhouse/* -export CIBW_BUILD='cp39-* cp310-* cp311-* cp312-*' -# export CIBW_BUILD='cp311-*' export CIBW_SKIP='*-win32 *-manylinux_i686 *-musllinux_*' # export CIBW_ARCHS_MACOS="x86_64" diff --git a/pyproject.toml b/pyproject.toml index 15ffd647..b1342b58 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,7 @@ file = "README.md" content-type = "text/markdown" [tool.cibuildwheel] +build = "cp39-* cp310-* cp311-* cp312-*" test-command = "python -c \"import flint; print(str(flint.fmpz(2)))\"" [tool.cibuildwheel.environment] From 10f6f1f1cf00a70256d51f9563e51b7ccfc80db4 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 2 Feb 2024 12:17:19 -0800 Subject: [PATCH 07/12] pyproject.toml: Move settings of CIBW_SKIP here --- .github/workflows/buildwheel.yml | 1 - bin/cibw.bat | 1 - bin/cibw.sh | 2 -- pyproject.toml | 1 + 4 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index f155c4e6..a9821e8e 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -34,7 +34,6 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.16.5 env: - CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux_*" CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_MANYLINUX_I686_IMAGE: manylinux2014 CIBW_BEFORE_ALL_MACOS: bin/cibw_before_all_macosx_x86_64.sh diff --git a/bin/cibw.bat b/bin/cibw.bat index 9a6c3e52..ee11b490 100644 --- a/bin/cibw.bat +++ b/bin/cibw.bat @@ -24,7 +24,6 @@ del /q wheelhouse\* rem override setting in pyproject.toml set CIBW_BUILD=cp39-* cp310-* cp311-* -set CIBW_SKIP=*-win32 *-manylinux_i686 *-musllinux_* set CIBW_BEFORE_ALL_WINDOWS=C:\msys64\usr\bin\bash bin/cibw_before_all_windows.sh set CIBW_BEFORE_BUILD_WINDOWS=C:\msys64\usr\bin\bash bin/cibw_before_build_windows.sh diff --git a/bin/cibw.sh b/bin/cibw.sh index 94229899..55f0b7c0 100755 --- a/bin/cibw.sh +++ b/bin/cibw.sh @@ -8,8 +8,6 @@ rm -f wheelhouse/* -export CIBW_SKIP='*-win32 *-manylinux_i686 *-musllinux_*' - # export CIBW_ARCHS_MACOS="x86_64" export CIBW_ARCHS_MACOS="arm64" diff --git a/pyproject.toml b/pyproject.toml index b1342b58..dc630833 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,6 +23,7 @@ content-type = "text/markdown" [tool.cibuildwheel] build = "cp39-* cp310-* cp311-* cp312-*" +skip = "*-win32 *-manylinux_i686 *-musllinux_*" test-command = "python -c \"import flint; print(str(flint.fmpz(2)))\"" [tool.cibuildwheel.environment] From c7f6aaaefc2304257f8332b71a9d7cd3fabc884f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 2 Feb 2024 12:14:42 -0800 Subject: [PATCH 08/12] Remove install of Python build prereqs in CIBW_BEFORE_BUILD --- .github/workflows/buildwheel.yml | 3 +-- bin/cibw.sh | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index a9821e8e..a56e984a 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -38,8 +38,7 @@ jobs: CIBW_MANYLINUX_I686_IMAGE: manylinux2014 CIBW_BEFORE_ALL_MACOS: bin/cibw_before_all_macosx_x86_64.sh CIBW_BEFORE_ALL_WINDOWS: msys2 -c bin/cibw_before_all_windows.sh - CIBW_BEFORE_BUILD_WINDOWS: msys2 -c bin/cibw_before_build_windows.sh - CIBW_BEFORE_BUILD: pip install numpy setuptools cython delvewheel + CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel && msys2 -c bin/cibw_before_build_windows.sh - uses: actions/upload-artifact@v4 with: diff --git a/bin/cibw.sh b/bin/cibw.sh index 55f0b7c0..bca3f288 100755 --- a/bin/cibw.sh +++ b/bin/cibw.sh @@ -15,8 +15,7 @@ export CIBW_ARCHS_MACOS="arm64" export CIBW_BEFORE_ALL_MACOS=bin/cibw_before_all_macosx_arm64.sh export CIBW_BEFORE_ALL_WINDOWS='C:\\msys64\\usr\\bin\\bash bin/cibw_before_all_windows.sh' -export CIBW_BEFORE_BUILD='pip install numpy cython delvewheel' -export CIBW_BEFORE_BUILD_WINDOWS='C:\\msys64\\usr\\bin\\bash bin/cibw_before_build_windows.sh' +export CIBW_BEFORE_BUILD_WINDOWS='pip install delvewheel && C:\\msys64\\usr\\bin\\bash bin/cibw_before_build_windows.sh' export CIBW_TEST_COMMAND="python -m flint.test" # override setting in pyproject.toml From 50c4804c11da50686adaaf4b9843f1c2a2239b4a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 2 Feb 2024 12:23:54 -0800 Subject: [PATCH 09/12] pyproject.toml: Move settings of CIBW_BEFORE_ALL_MACOS here --- .github/workflows/buildwheel.yml | 1 - bin/cibw.sh | 2 -- pyproject.toml | 1 + 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index a56e984a..cb3ffdcf 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -36,7 +36,6 @@ jobs: env: CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_MANYLINUX_I686_IMAGE: manylinux2014 - CIBW_BEFORE_ALL_MACOS: bin/cibw_before_all_macosx_x86_64.sh CIBW_BEFORE_ALL_WINDOWS: msys2 -c bin/cibw_before_all_windows.sh CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel && msys2 -c bin/cibw_before_build_windows.sh diff --git a/bin/cibw.sh b/bin/cibw.sh index bca3f288..1e4ae1ec 100755 --- a/bin/cibw.sh +++ b/bin/cibw.sh @@ -11,8 +11,6 @@ rm -f wheelhouse/* # export CIBW_ARCHS_MACOS="x86_64" export CIBW_ARCHS_MACOS="arm64" -# export CIBW_BEFORE_ALL_MACOS=bin/cibw_before_all_macosx_x86_64.sh -export CIBW_BEFORE_ALL_MACOS=bin/cibw_before_all_macosx_arm64.sh export CIBW_BEFORE_ALL_WINDOWS='C:\\msys64\\usr\\bin\\bash bin/cibw_before_all_windows.sh' export CIBW_BEFORE_BUILD_WINDOWS='pip install delvewheel && C:\\msys64\\usr\\bin\\bash bin/cibw_before_build_windows.sh' diff --git a/pyproject.toml b/pyproject.toml index dc630833..1cf357b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,6 +36,7 @@ LD_LIBRARY_PATH = "$(pwd)/.local/lib:$LD_LIBRARY_PATH" before-all = "bin/cibw_before_all_linux.sh" [tool.cibuildwheel.macos] +before-all = "bin/cibw_before_all_macosx_$(uname -m).sh" [tool.cibuildwheel.windows] repair-wheel-command = "bin\\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}" From 1666fb09d847676d88f7b0a4f883dfd0b039b387 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 2 Feb 2024 12:29:43 -0800 Subject: [PATCH 10/12] pyproject.toml: Move settings of CIBW_BEFORE_ALL_WINDOWS and CIBW_BEFORE_BUILD_WINDOWS here --- .github/workflows/buildwheel.yml | 1 + bin/cibw.bat | 3 --- bin/cibw.sh | 4 ---- pyproject.toml | 2 ++ 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index cb3ffdcf..67a30a67 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -36,6 +36,7 @@ jobs: env: CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 CIBW_MANYLINUX_I686_IMAGE: manylinux2014 + # override setting in pyproject.toml to use msys2 instead of msys64 bash CIBW_BEFORE_ALL_WINDOWS: msys2 -c bin/cibw_before_all_windows.sh CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel && msys2 -c bin/cibw_before_build_windows.sh diff --git a/bin/cibw.bat b/bin/cibw.bat index ee11b490..8f62e8e9 100644 --- a/bin/cibw.bat +++ b/bin/cibw.bat @@ -24,7 +24,4 @@ del /q wheelhouse\* rem override setting in pyproject.toml set CIBW_BUILD=cp39-* cp310-* cp311-* -set CIBW_BEFORE_ALL_WINDOWS=C:\msys64\usr\bin\bash bin/cibw_before_all_windows.sh -set CIBW_BEFORE_BUILD_WINDOWS=C:\msys64\usr\bin\bash bin/cibw_before_build_windows.sh - cibuildwheel --platform windows diff --git a/bin/cibw.sh b/bin/cibw.sh index 1e4ae1ec..23a70498 100755 --- a/bin/cibw.sh +++ b/bin/cibw.sh @@ -11,10 +11,6 @@ rm -f wheelhouse/* # export CIBW_ARCHS_MACOS="x86_64" export CIBW_ARCHS_MACOS="arm64" -export CIBW_BEFORE_ALL_WINDOWS='C:\\msys64\\usr\\bin\\bash bin/cibw_before_all_windows.sh' - -export CIBW_BEFORE_BUILD_WINDOWS='pip install delvewheel && C:\\msys64\\usr\\bin\\bash bin/cibw_before_build_windows.sh' - export CIBW_TEST_COMMAND="python -m flint.test" # override setting in pyproject.toml # cibuildwheel --platform linux diff --git a/pyproject.toml b/pyproject.toml index 1cf357b9..e16102fb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,8 @@ before-all = "bin/cibw_before_all_linux.sh" before-all = "bin/cibw_before_all_macosx_$(uname -m).sh" [tool.cibuildwheel.windows] +before-all = "C:\\msys64\\usr\\bin\\bash bin/cibw_before_all_windows.sh" +before-build = "pip install delvewheel && C:\\msys64\\usr\\bin\\bash bin/cibw_before_build_windows.sh" repair-wheel-command = "bin\\cibw_repair_wheel_command_windows.bat {dest_dir} {wheel}" [tool.cibuildwheel.windows.environment] From 4114a394b8b0c56af0f5bd189dfcf368dc3b97f8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 2 Feb 2024 12:33:03 -0800 Subject: [PATCH 11/12] pyproject.toml: Move settings of CIBW_MANYLINUX_*_IMAGE here --- .github/workflows/buildwheel.yml | 2 -- pyproject.toml | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/buildwheel.yml b/.github/workflows/buildwheel.yml index 67a30a67..03e01a68 100644 --- a/.github/workflows/buildwheel.yml +++ b/.github/workflows/buildwheel.yml @@ -34,8 +34,6 @@ jobs: - name: Build wheels uses: pypa/cibuildwheel@v2.16.5 env: - CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 - CIBW_MANYLINUX_I686_IMAGE: manylinux2014 # override setting in pyproject.toml to use msys2 instead of msys64 bash CIBW_BEFORE_ALL_WINDOWS: msys2 -c bin/cibw_before_all_windows.sh CIBW_BEFORE_BUILD_WINDOWS: pip install delvewheel && msys2 -c bin/cibw_before_build_windows.sh diff --git a/pyproject.toml b/pyproject.toml index e16102fb..19d18a8a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,8 @@ content-type = "text/markdown" [tool.cibuildwheel] build = "cp39-* cp310-* cp311-* cp312-*" skip = "*-win32 *-manylinux_i686 *-musllinux_*" +manylinux-x86_64-image = "manylinux2014" +manylinux-i686-image = "manylinux2014" test-command = "python -c \"import flint; print(str(flint.fmpz(2)))\"" [tool.cibuildwheel.environment] From 117cf3dc32bb1e9dad992e044126b0944d1c0631 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 2 Feb 2024 12:46:39 -0800 Subject: [PATCH 12/12] bin/build_dependencies_unix.sh: Use 'make -j6' --- bin/build_dependencies_unix.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/build_dependencies_unix.sh b/bin/build_dependencies_unix.sh index 442d74f4..7f807a9f 100755 --- a/bin/build_dependencies_unix.sh +++ b/bin/build_dependencies_unix.sh @@ -174,7 +174,7 @@ if [ $USE_GMP = "gmp" ]; then --enable-shared=yes\ --enable-static=no\ --host=$HOST_ARG - make -j3 + make -j6 make install cd .. @@ -195,7 +195,7 @@ else tar xf yasm-$YASMVER.tar.gz cd yasm-$YASMVER ./configure --prefix=$PREFIX - make -j3 + make -j6 make install cd .. @@ -226,7 +226,7 @@ else --enable-shared=yes\ --enable-static=no\ --enable-gmpcompat - make -j3 + make -j6 make install cd .. @@ -260,7 +260,7 @@ else --with-gmp=$PREFIX\ --enable-shared=yes\ --enable-static=no - make -j3 + make -j6 make install cd .. fi @@ -285,7 +285,7 @@ cd flint-$FLINTVER $FLINTARB_WITHGMP\ --with-mpfr=$PREFIX\ --disable-static - make -j3 + make -j6 make install cd .. @@ -312,7 +312,7 @@ if [ $BUILD_ARB = "yes" ]; then $FLINTARB_WITHGMP\ --with-mpfr=$PREFIX\ --disable-static - make -j3 + make -j6 make install # # Set PATH so that DLLs are picked up on Windows.