From bd53f81d62b44d5a1b93662168c0b225acec39f0 Mon Sep 17 00:00:00 2001 From: Louis Fruleux Date: Fri, 1 Aug 2025 10:26:20 +0200 Subject: [PATCH 01/13] try cibuildwheel windows --- .github/workflows/publish-pypi.yml | 234 +++++++++++++++-------------- 1 file changed, 125 insertions(+), 109 deletions(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index b5db15e..cc68f4d 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -13,126 +13,142 @@ jobs: fail-fast: false matrix: include: - # Linux 64 bit manylinux_2_28 - - os: ubuntu-latest + # Windows 64 bits + - os: windows-latest python: 310 - platform_id: manylinux_x86_64 - manylinux_image: manylinux_2_28 - - os: ubuntu-latest + - os: windows-latest python: 311 - platform_id: manylinux_x86_64 - manylinux_image: manylinux_2_28 - - os: ubuntu-latest + - os: windows-latest python: 312 - platform_id: manylinux_x86_64 - manylinux_image: manylinux_2_28 - - os: ubuntu-latest + - os: windows-latest python: 313 - platform_id: manylinux_x86_64 - manylinux_image: manylinux_2_28 - - os: ubuntu-latest + - os: windows-latest python: 313t - platform_id: manylinux_x86_64 - manylinux_image: manylinux_2_28 - - os: ubuntu-latest + - os: windows-latest python: 314 - platform_id: manylinux_x86_64 - manylinux_image: manylinux_2_28 - - os: ubuntu-latest + - os: windows-latest python: 314t - platform_id: manylinux_x86_64 - manylinux_image: manylinux_2_28 - # Linux ARM 64 bit manylinux_2_28 - - os: ubuntu-24.04-arm - python: 310 - platform_id: manylinux_aarch64 - manylinux_image: manylinux_2_28 - - os: ubuntu-24.04-arm - python: 311 - platform_id: manylinux_aarch64 - manylinux_image: manylinux_2_28 - - os: ubuntu-24.04-arm - python: 312 - platform_id: manylinux_aarch64 - manylinux_image: manylinux_2_28 - - os: ubuntu-24.04-arm - python: 313 - platform_id: manylinux_aarch64 - manylinux_image: manylinux_2_28 - - os: ubuntu-24.04-arm - python: 313t - platform_id: manylinux_aarch64 - manylinux_image: manylinux_2_28 - - os: ubuntu-24.04-arm - python: 314 - platform_id: manylinux_aarch64 - manylinux_image: manylinux_2_28 - - os: ubuntu-24.04-arm - python: 314t - platform_id: manylinux_aarch64 - manylinux_image: manylinux_2_28 + # # Linux 64 bit manylinux_2_28 + # - os: ubuntu-latest + # python: 310 + # platform_id: manylinux_x86_64 + # manylinux_image: manylinux_2_28 + # - os: ubuntu-latest + # python: 311 + # platform_id: manylinux_x86_64 + # manylinux_image: manylinux_2_28 + # - os: ubuntu-latest + # python: 312 + # platform_id: manylinux_x86_64 + # manylinux_image: manylinux_2_28 + # - os: ubuntu-latest + # python: 313 + # platform_id: manylinux_x86_64 + # manylinux_image: manylinux_2_28 + # - os: ubuntu-latest + # python: 313t + # platform_id: manylinux_x86_64 + # manylinux_image: manylinux_2_28 + # - os: ubuntu-latest + # python: 314 + # platform_id: manylinux_x86_64 + # manylinux_image: manylinux_2_28 + # - os: ubuntu-latest + # python: 314t + # platform_id: manylinux_x86_64 + # manylinux_image: manylinux_2_28 - # MacOS x86_64 - - os: macos-13 - python: 310 - platform_id: macosx_x86_64 - deployment_target: 13.0 - - os: macos-13 - python: 311 - platform_id: macosx_x86_64 - deployment_target: 13.0 - - os: macos-13 - python: 312 - platform_id: macosx_x86_64 - deployment_target: 13.0 - - os: macos-13 - python: 313 - platform_id: macosx_x86_64 - deployment_target: 13.0 - - os: macos-13 - python: 313t - platform_id: macosx_x86_64 - deployment_target: 13.0 - - os: macos-13 - python: 314 - platform_id: macosx_x86_64 - deployment_target: 13.0 - - os: macos-13 - python: 314t - platform_id: macosx_x86_64 - deployment_target: 13.0 + # # Linux ARM 64 bit manylinux_2_28 + # - os: ubuntu-24.04-arm + # python: 310 + # platform_id: manylinux_aarch64 + # manylinux_image: manylinux_2_28 + # - os: ubuntu-24.04-arm + # python: 311 + # platform_id: manylinux_aarch64 + # manylinux_image: manylinux_2_28 + # - os: ubuntu-24.04-arm + # python: 312 + # platform_id: manylinux_aarch64 + # manylinux_image: manylinux_2_28 + # - os: ubuntu-24.04-arm + # python: 313 + # platform_id: manylinux_aarch64 + # manylinux_image: manylinux_2_28 + # - os: ubuntu-24.04-arm + # python: 313t + # platform_id: manylinux_aarch64 + # manylinux_image: manylinux_2_28 + # - os: ubuntu-24.04-arm + # python: 314 + # platform_id: manylinux_aarch64 + # manylinux_image: manylinux_2_28 + # - os: ubuntu-24.04-arm + # python: 314t + # platform_id: manylinux_aarch64 + # manylinux_image: manylinux_2_28 + # # MacOS x86_64 + # - os: macos-13 + # python: 310 + # platform_id: macosx_x86_64 + # deployment_target: 13.0 + # - os: macos-13 + # python: 311 + # platform_id: macosx_x86_64 + # deployment_target: 13.0 + # - os: macos-13 + # python: 312 + # platform_id: macosx_x86_64 + # deployment_target: 13.0 + # - os: macos-13 + # python: 313 + # platform_id: macosx_x86_64 + # deployment_target: 13.0 + # - os: macos-13 + # python: 313t + # platform_id: macosx_x86_64 + # deployment_target: 13.0 + # - os: macos-13 + # python: 314 + # platform_id: macosx_x86_64 + # deployment_target: 13.0 + # - os: macos-13 + # python: 314t + # platform_id: macosx_x86_64 + # deployment_target: 13.0 - # MacOS ARM - - os: macos-14 - python: 310 - platform_id: macosx_arm64 - deployment_target: 14.0 - - os: macos-14 - python: 311 - platform_id: macosx_arm64 - deployment_target: 14.0 - - os: macos-14 - python: 312 - platform_id: macosx_arm64 - deployment_target: 14.0 - - os: macos-14 - python: 313 - platform_id: macosx_arm64 - deployment_target: 14.0 - - os: macos-14 - python: 313t - platform_id: macosx_arm64 - deployment_target: 14.0 - - os: macos-14 - python: 314 - platform_id: macosx_arm64 - deployment_target: 14.0 - - os: macos-14 - python: 314t - platform_id: macosx_arm64 - deployment_target: 14.0 + + # # MacOS ARM + # - os: macos-14 + # python: 310 + # platform_id: macosx_arm64 + # deployment_target: 14.0 + # - os: macos-14 + # python: 311 + # platform_id: macosx_arm64 + # deployment_target: 14.0 + # - os: macos-14 + # python: 312 + # platform_id: macosx_arm64 + # deployment_target: 14.0 + # - os: macos-14 + # python: 313 + # platform_id: macosx_arm64 + # deployment_target: 14.0 + # - os: macos-14 + # python: 313t + # platform_id: macosx_arm64 + # deployment_target: 14.0 + # - os: macos-14 + # python: 314 + # platform_id: macosx_arm64 + # deployment_target: 14.0 + # - os: macos-14 + # python: 314t + # platform_id: macosx_arm64 + # deployment_target: 14.0 steps: - name: Checkout CPT From bdd88e2e0549ec82901706c4064fc9f31a4a4e50 Mon Sep 17 00:00:00 2001 From: Louis Fruleux Date: Fri, 1 Aug 2025 10:26:38 +0200 Subject: [PATCH 02/13] try cibuildwheel windows --- appveyor.yml | 124 +++++++++++++++++++++++++-------------------------- 1 file changed, 62 insertions(+), 62 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 9901ccb..a21de49 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,62 +1,62 @@ -# Heavily inspired from https://github.com/CheetahTemplate3/cheetah3 - -version: '{branch}-{build}' - -cache: - - '%LOCALAPPDATA%\pip\Cache' - -# Match travis -clone_depth: 50 - -skip_branch_with_pr: true - -environment: - global: - # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the - # /E:ON and /V:ON options are not enabled in the batch script intepreter - # See: http://stackoverflow.com/a/13751649/163740 - CMD_IN_ENV: "cmd /E:ON /V:ON /C CI\\run_with_env.cmd" - - matrix: - - PYTHON_VERSION: "3.10" - PYTHON_ARCH: "64" - PYTHON_HOME: "C:\\Python310-x64" - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 - - PYTHON_VERSION: "3.11" - PYTHON_ARCH: "64" - PYTHON_HOME: "C:\\Python311-x64" - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - - PYTHON_VERSION: "3.12" - PYTHON_ARCH: "64" - PYTHON_HOME: "C:\\Python312-x64" - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - - PYTHON_VERSION: "3.13" - PYTHON_ARCH: "64" - PYTHON_HOME: "C:\\Python313-x64" - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - # Python 3.14 is not yet available - # https://www.appveyor.com/docs/windows-images-software/ -install: - # Ensure we use the right python version - - "SET PATH=%PYTHON_HOME%;%PYTHON_HOME%\\Scripts;%PATH%" - - "SET TOXPYTHON=%PYTHON_HOME%\\python.exe" - - "python --version" - - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" - - "python -m pip install --upgrade pip cython pytest tox ppu setuptools" - - "pip --version" - -build_script: - - "%WITH_ENV% python setup.py build_ext --inplace" - -test_script: - - "%CMD_IN_ENV% pytest" - -deploy_script: - # If tests are successful and we've tested a tag, deploy binary wheel - # TWINE_USERNAME / TWINE_PASSWORD / TWINE_REPOSITORY_URL - # must be set in AppVeyor settings. - - if "%APPVEYOR_REPO_TAG%" == "true" ( - pip install --upgrade twine "wheel==0.45.1" && - %CMD_IN_ENV% python setup.py bdist_wheel && - twine upload --skip-existing dist\\*.whl --repository-url %TWINE_REPOSITORY_URL% -u %TWINE_USERNAME% -p %TWINE_PASSWORD% - ) +# # Heavily inspired from https://github.com/CheetahTemplate3/cheetah3 + +# version: '{branch}-{build}' + +# cache: +# - '%LOCALAPPDATA%\pip\Cache' + +# # Match travis +# clone_depth: 50 + +# skip_branch_with_pr: true + +# environment: +# global: +# # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the +# # /E:ON and /V:ON options are not enabled in the batch script intepreter +# # See: http://stackoverflow.com/a/13751649/163740 +# CMD_IN_ENV: "cmd /E:ON /V:ON /C CI\\run_with_env.cmd" + +# matrix: +# - PYTHON_VERSION: "3.10" +# PYTHON_ARCH: "64" +# PYTHON_HOME: "C:\\Python310-x64" +# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 +# - PYTHON_VERSION: "3.11" +# PYTHON_ARCH: "64" +# PYTHON_HOME: "C:\\Python311-x64" +# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 +# - PYTHON_VERSION: "3.12" +# PYTHON_ARCH: "64" +# PYTHON_HOME: "C:\\Python312-x64" +# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 +# - PYTHON_VERSION: "3.13" +# PYTHON_ARCH: "64" +# PYTHON_HOME: "C:\\Python313-x64" +# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 +# # Python 3.14 is not yet available +# # https://www.appveyor.com/docs/windows-images-software/ +# install: +# # Ensure we use the right python version +# - "SET PATH=%PYTHON_HOME%;%PYTHON_HOME%\\Scripts;%PATH%" +# - "SET TOXPYTHON=%PYTHON_HOME%\\python.exe" +# - "python --version" +# - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" +# - "python -m pip install --upgrade pip cython pytest tox ppu setuptools" +# - "pip --version" + +# build_script: +# - "%WITH_ENV% python setup.py build_ext --inplace" + +# test_script: +# - "%CMD_IN_ENV% pytest" + +# deploy_script: +# # If tests are successful and we've tested a tag, deploy binary wheel +# # TWINE_USERNAME / TWINE_PASSWORD / TWINE_REPOSITORY_URL +# # must be set in AppVeyor settings. +# - if "%APPVEYOR_REPO_TAG%" == "true" ( +# pip install --upgrade twine "wheel==0.45.1" && +# %CMD_IN_ENV% python setup.py bdist_wheel && +# twine upload --skip-existing dist\\*.whl --repository-url %TWINE_REPOSITORY_URL% -u %TWINE_USERNAME% -p %TWINE_PASSWORD% +# ) From 7517c5be25ff261d8565bcb2a923162868b9dde0 Mon Sep 17 00:00:00 2001 From: Louis Fruleux Date: Fri, 1 Aug 2025 10:30:31 +0200 Subject: [PATCH 03/13] try cibuildwheel windows --- .github/workflows/publish-pypi.yml | 7 +++ CI/run_with_env.cmd | 88 ------------------------------ CI/upload_wheels.sh | 9 --- appveyor.yml | 62 --------------------- 4 files changed, 7 insertions(+), 159 deletions(-) delete mode 100644 CI/run_with_env.cmd delete mode 100755 CI/upload_wheels.sh delete mode 100644 appveyor.yml diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index cc68f4d..2b165d9 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -16,18 +16,25 @@ jobs: # Windows 64 bits - os: windows-latest python: 310 + platform_id: win_amd64 - os: windows-latest python: 311 + platform_id: win_amd64 - os: windows-latest python: 312 + platform_id: win_amd64 - os: windows-latest python: 313 + platform_id: win_amd64 - os: windows-latest python: 313t + platform_id: win_amd64 - os: windows-latest python: 314 + platform_id: win_amd64 - os: windows-latest python: 314t + platform_id: win_amd64 # # Linux 64 bit manylinux_2_28 # - os: ubuntu-latest diff --git a/CI/run_with_env.cmd b/CI/run_with_env.cmd deleted file mode 100644 index b63b2b6..0000000 --- a/CI/run_with_env.cmd +++ /dev/null @@ -1,88 +0,0 @@ -:: To build extensions for 64 bit Python 3, we need to configure environment -:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of: -:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1) -:: -:: To build extensions for 64 bit Python 2, we need to configure environment -:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of: -:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0) -:: -:: 32 bit builds, and 64-bit builds for 3.5 and beyond, do not require specific -:: environment configurations. -:: -:: Note: this script needs to be run with the /E:ON and /V:ON flags for the -:: cmd interpreter, at least for (SDK v7.0) -:: -:: More details at: -:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows -:: http://stackoverflow.com/a/13751649/163740 -:: -:: Author: Olivier Grisel -:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/ -:: -:: Notes about batch files for Python people: -:: -:: Quotes in values are literally part of the values: -:: SET FOO="bar" -:: FOO is now five characters long: " b a r " -:: If you don't want quotes, don't include them on the right-hand side. -:: -:: The CALL lines at the end of this file look redundant, but if you move them -:: outside of the IF clauses, they do not run properly in the SET_SDK_64==Y -:: case, I don't know why. -@ECHO OFF - -SET COMMAND_TO_RUN=%* -SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows -SET WIN_WDK=c:\Program Files (x86)\Windows Kits\10\Include\wdf - -:: Extract the major and minor versions, and allow for the minor version to be -:: more than 9. This requires the version number to have two dots in it. -SET MAJOR_PYTHON_VERSION=%PYTHON_VERSION:~0,1% -IF "%PYTHON_VERSION:~3,1%" == "." ( - SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,1% -) ELSE ( - SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,2% -) - -:: Based on the Python version, determine what SDK version to use, and whether -:: to set the SDK for 64-bit. -IF %MAJOR_PYTHON_VERSION% == 2 ( - SET WINDOWS_SDK_VERSION="v7.0" - SET SET_SDK_64=Y -) ELSE ( - IF %MAJOR_PYTHON_VERSION% == 3 ( - SET WINDOWS_SDK_VERSION="v7.1" - IF %MINOR_PYTHON_VERSION% LEQ 4 ( - SET SET_SDK_64=Y - ) ELSE ( - SET SET_SDK_64=N - IF EXIST "%WIN_WDK%" ( - :: See: https://connect.microsoft.com/VisualStudio/feedback/details/1610302/ - REN "%WIN_WDK%" 0wdf - ) - ) - ) ELSE ( - ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%" - EXIT 1 - ) -) - -IF %PYTHON_ARCH% == 64 ( - IF %SET_SDK_64% == Y ( - ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture - SET DISTUTILS_USE_SDK=1 - SET MSSdk=1 - "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION% - "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release - ECHO Executing: %COMMAND_TO_RUN% - call %COMMAND_TO_RUN% || EXIT 1 - ) ELSE ( - ECHO Using default MSVC build environment for 64 bit architecture - ECHO Executing: %COMMAND_TO_RUN% - call %COMMAND_TO_RUN% || EXIT 1 - ) -) ELSE ( - ECHO Using default MSVC build environment for 32 bit architecture - ECHO Executing: %COMMAND_TO_RUN% - call %COMMAND_TO_RUN% || EXIT 1 -) \ No newline at end of file diff --git a/CI/upload_wheels.sh b/CI/upload_wheels.sh deleted file mode 100755 index 5bdcd6a..0000000 --- a/CI/upload_wheels.sh +++ /dev/null @@ -1,9 +0,0 @@ -upload_wheels() { - pwd - ls -l - python3 -m pip install twine - if [[ $TRAVIS_TAG ]]; then - python3 -m pip install twine - python3 -m twine upload ./wheelhouse/*.whl - fi -} \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index a21de49..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,62 +0,0 @@ -# # Heavily inspired from https://github.com/CheetahTemplate3/cheetah3 - -# version: '{branch}-{build}' - -# cache: -# - '%LOCALAPPDATA%\pip\Cache' - -# # Match travis -# clone_depth: 50 - -# skip_branch_with_pr: true - -# environment: -# global: -# # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the -# # /E:ON and /V:ON options are not enabled in the batch script intepreter -# # See: http://stackoverflow.com/a/13751649/163740 -# CMD_IN_ENV: "cmd /E:ON /V:ON /C CI\\run_with_env.cmd" - -# matrix: -# - PYTHON_VERSION: "3.10" -# PYTHON_ARCH: "64" -# PYTHON_HOME: "C:\\Python310-x64" -# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 -# - PYTHON_VERSION: "3.11" -# PYTHON_ARCH: "64" -# PYTHON_HOME: "C:\\Python311-x64" -# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 -# - PYTHON_VERSION: "3.12" -# PYTHON_ARCH: "64" -# PYTHON_HOME: "C:\\Python312-x64" -# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 -# - PYTHON_VERSION: "3.13" -# PYTHON_ARCH: "64" -# PYTHON_HOME: "C:\\Python313-x64" -# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 -# # Python 3.14 is not yet available -# # https://www.appveyor.com/docs/windows-images-software/ -# install: -# # Ensure we use the right python version -# - "SET PATH=%PYTHON_HOME%;%PYTHON_HOME%\\Scripts;%PATH%" -# - "SET TOXPYTHON=%PYTHON_HOME%\\python.exe" -# - "python --version" -# - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" -# - "python -m pip install --upgrade pip cython pytest tox ppu setuptools" -# - "pip --version" - -# build_script: -# - "%WITH_ENV% python setup.py build_ext --inplace" - -# test_script: -# - "%CMD_IN_ENV% pytest" - -# deploy_script: -# # If tests are successful and we've tested a tag, deploy binary wheel -# # TWINE_USERNAME / TWINE_PASSWORD / TWINE_REPOSITORY_URL -# # must be set in AppVeyor settings. -# - if "%APPVEYOR_REPO_TAG%" == "true" ( -# pip install --upgrade twine "wheel==0.45.1" && -# %CMD_IN_ENV% python setup.py bdist_wheel && -# twine upload --skip-existing dist\\*.whl --repository-url %TWINE_REPOSITORY_URL% -u %TWINE_USERNAME% -p %TWINE_PASSWORD% -# ) From f1f90cd1704e11865db192d8d048f6e35c9c20e1 Mon Sep 17 00:00:00 2001 From: Louis Fruleux Date: Fri, 1 Aug 2025 11:13:55 +0200 Subject: [PATCH 04/13] fix windows builds --- .github/workflows/publish-pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 2b165d9..473d126 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -173,7 +173,7 @@ jobs: CIBW_ARCHS: all CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }} CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }} - CIBW_BEFORE_TEST: "CC=gcc CXX=g++" + CIBW_BEFORE_TEST: ${{ matrix.os != 'windows-latest' && 'CC=gcc CXX=g++' || '' }} CIBW_TEST_REQUIRES: pytest CIBW_TEST_COMMAND: "mkdir tmp_for_test; cp -r {project}/tests tmp_for_test; pytest tmp_for_test/tests" CIBW_BUILD_VERBOSITY: 1 From 089fe881f36367eb93dcbaa693a3ba16a6ff50ae Mon Sep 17 00:00:00 2001 From: Louis Fruleux Date: Fri, 1 Aug 2025 11:18:34 +0200 Subject: [PATCH 05/13] change test command --- .github/workflows/publish-pypi.yml | 2 +- CI/github/osx/run_cibw_test.sh | 5 +++++ CI/github/windows/run_cibw_test.cmd | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 CI/github/osx/run_cibw_test.sh create mode 100644 CI/github/windows/run_cibw_test.cmd diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 473d126..6334662 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -175,7 +175,7 @@ jobs: CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }} CIBW_BEFORE_TEST: ${{ matrix.os != 'windows-latest' && 'CC=gcc CXX=g++' || '' }} CIBW_TEST_REQUIRES: pytest - CIBW_TEST_COMMAND: "mkdir tmp_for_test; cp -r {project}/tests tmp_for_test; pytest tmp_for_test/tests" + CIBW_TEST_COMMAND: ${{ matrix.os == 'windows-latest' && 'CI\\github\\windows\\run_cibw_test.cmd' || 'bash CI/github/osx/run_cibw_test.sh' }} CIBW_BUILD_VERBOSITY: 1 CIBW_ENVIRONMENT_MACOS: ${{ format('MACOSX_DEPLOYMENT_TARGET={0}', matrix.deployment_target) }} CIBW_ENABLE: cpython-freethreading diff --git a/CI/github/osx/run_cibw_test.sh b/CI/github/osx/run_cibw_test.sh new file mode 100644 index 0000000..a2be939 --- /dev/null +++ b/CI/github/osx/run_cibw_test.sh @@ -0,0 +1,5 @@ +#!/bin/sh +set -e +mkdir -p tmp_for_test +cp -r {project}/tests tmp_for_test +pytest tmp_for_test/tests diff --git a/CI/github/windows/run_cibw_test.cmd b/CI/github/windows/run_cibw_test.cmd new file mode 100644 index 0000000..7600b33 --- /dev/null +++ b/CI/github/windows/run_cibw_test.cmd @@ -0,0 +1,5 @@ +@echo off +REM copy recursively; /E copies all subdirs, /I assumes destination is directory +mkdir tmp_for_test +xcopy /E /I {project}\tests tmp_for_test\tests +pytest tmp_for_test/tests From 5e9d05d1a3f0670be59e27afbf57197e8e751bad Mon Sep 17 00:00:00 2001 From: Louis Fruleux Date: Fri, 1 Aug 2025 11:50:26 +0200 Subject: [PATCH 06/13] change test command --- .github/workflows/publish-pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 6334662..735767b 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -175,7 +175,7 @@ jobs: CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }} CIBW_BEFORE_TEST: ${{ matrix.os != 'windows-latest' && 'CC=gcc CXX=g++' || '' }} CIBW_TEST_REQUIRES: pytest - CIBW_TEST_COMMAND: ${{ matrix.os == 'windows-latest' && 'CI\\github\\windows\\run_cibw_test.cmd' || 'bash CI/github/osx/run_cibw_test.sh' }} + CIBW_TEST_COMMAND: CIBW_TEST_COMMAND: pytest tests CIBW_BUILD_VERBOSITY: 1 CIBW_ENVIRONMENT_MACOS: ${{ format('MACOSX_DEPLOYMENT_TARGET={0}', matrix.deployment_target) }} CIBW_ENABLE: cpython-freethreading From 45cdd792bd8c6d58a8d0dffb4081a937d27468a6 Mon Sep 17 00:00:00 2001 From: Louis Fruleux Date: Fri, 1 Aug 2025 13:55:50 +0200 Subject: [PATCH 07/13] change test command --- .github/workflows/publish-pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 735767b..0f0cc3f 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -175,7 +175,7 @@ jobs: CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }} CIBW_BEFORE_TEST: ${{ matrix.os != 'windows-latest' && 'CC=gcc CXX=g++' || '' }} CIBW_TEST_REQUIRES: pytest - CIBW_TEST_COMMAND: CIBW_TEST_COMMAND: pytest tests + CIBW_TEST_COMMAND: pytest tests CIBW_BUILD_VERBOSITY: 1 CIBW_ENVIRONMENT_MACOS: ${{ format('MACOSX_DEPLOYMENT_TARGET={0}', matrix.deployment_target) }} CIBW_ENABLE: cpython-freethreading From 9d8d8cf55e2eb264a771b83d6e66baad600cb334 Mon Sep 17 00:00:00 2001 From: Louis Fruleux Date: Fri, 1 Aug 2025 14:07:24 +0200 Subject: [PATCH 08/13] change test command --- .github/workflows/publish-pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 0f0cc3f..a534326 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -175,7 +175,7 @@ jobs: CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }} CIBW_BEFORE_TEST: ${{ matrix.os != 'windows-latest' && 'CC=gcc CXX=g++' || '' }} CIBW_TEST_REQUIRES: pytest - CIBW_TEST_COMMAND: pytest tests + CIBW_TEST_COMMAND: pytest {project}\\tests CIBW_BUILD_VERBOSITY: 1 CIBW_ENVIRONMENT_MACOS: ${{ format('MACOSX_DEPLOYMENT_TARGET={0}', matrix.deployment_target) }} CIBW_ENABLE: cpython-freethreading From 99f177ad657f322108c2d2316647ab6aaa853acd Mon Sep 17 00:00:00 2001 From: Louis Fruleux Date: Fri, 1 Aug 2025 14:11:32 +0200 Subject: [PATCH 09/13] change test command --- .github/workflows/publish-pypi.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index a534326..1995fd1 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -175,7 +175,8 @@ jobs: CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }} CIBW_BEFORE_TEST: ${{ matrix.os != 'windows-latest' && 'CC=gcc CXX=g++' || '' }} CIBW_TEST_REQUIRES: pytest - CIBW_TEST_COMMAND: pytest {project}\\tests + # Commands needed because we are not in CPT, and the wheel is produced in the current directoy. Maybe fix `from .cpt import cpt`? + CIBW_TEST_COMMAND: ${{ matrix.os == 'windows-latest' && 'cmd /c "mkdir tmp_for_test && xcopy /E /I tests tmp_for_test\\tests && pytest tmp_for_test/tests"' || 'bash -c \"mkdir -p tmp_for_test && cp -r tests tmp_for_test && pytest tmp_for_test/tests\"' }} CIBW_BUILD_VERBOSITY: 1 CIBW_ENVIRONMENT_MACOS: ${{ format('MACOSX_DEPLOYMENT_TARGET={0}', matrix.deployment_target) }} CIBW_ENABLE: cpython-freethreading From 85e8cc4f0d42779c9c0babafa1330a77b0940af6 Mon Sep 17 00:00:00 2001 From: Louis Fruleux Date: Fri, 1 Aug 2025 14:15:15 +0200 Subject: [PATCH 10/13] change test command --- .github/workflows/publish-pypi.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 1995fd1..d4f23bb 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -166,6 +166,16 @@ jobs: with: python-version: '3.13' + # We need to copy the tests in a new dir, because we are above CPT, not in the folder CPT. + # Maybe fix `from .cpt import cpt`, so we can test wherever the built wheel is? + - name: Prepare test command for Windows + if: matrix.os == 'windows-latest' + run: echo 'CIBW_TEST_COMMAND=cmd /c "mkdir tmp_for_test && xcopy /E /I {project}\\tests tmp_for_test\\tests && pytest tmp_for_test/tests"' >> $GITHUB_ENV + + - name: Prepare test command for Unix-like + if: matrix.os != 'windows-latest' + run: echo 'CIBW_TEST_COMMAND=bash -c "mkdir -p tmp_for_test && cp -r {project}/tests tmp_for_test && pytest tmp_for_test/tests"' >> $GITHUB_ENV + - name: Build and test wheels env: CIBW_BEFORE_BUILD: "python -m pip install --upgrade pip" @@ -175,7 +185,7 @@ jobs: CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }} CIBW_BEFORE_TEST: ${{ matrix.os != 'windows-latest' && 'CC=gcc CXX=g++' || '' }} CIBW_TEST_REQUIRES: pytest - # Commands needed because we are not in CPT, and the wheel is produced in the current directoy. Maybe fix `from .cpt import cpt`? + # CIBW_TEST_COMMAND is defined above. CIBW_TEST_COMMAND: ${{ matrix.os == 'windows-latest' && 'cmd /c "mkdir tmp_for_test && xcopy /E /I tests tmp_for_test\\tests && pytest tmp_for_test/tests"' || 'bash -c \"mkdir -p tmp_for_test && cp -r tests tmp_for_test && pytest tmp_for_test/tests\"' }} CIBW_BUILD_VERBOSITY: 1 CIBW_ENVIRONMENT_MACOS: ${{ format('MACOSX_DEPLOYMENT_TARGET={0}', matrix.deployment_target) }} From 49f3561b5d6d6ed84e410b0db26af228013f52aa Mon Sep 17 00:00:00 2001 From: Louis Fruleux Date: Fri, 1 Aug 2025 14:24:39 +0200 Subject: [PATCH 11/13] change test command --- .github/workflows/publish-pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index d4f23bb..cf170a7 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -170,7 +170,7 @@ jobs: # Maybe fix `from .cpt import cpt`, so we can test wherever the built wheel is? - name: Prepare test command for Windows if: matrix.os == 'windows-latest' - run: echo 'CIBW_TEST_COMMAND=cmd /c "mkdir tmp_for_test && xcopy /E /I {project}\\tests tmp_for_test\\tests && pytest tmp_for_test/tests"' >> $GITHUB_ENV + run: echo 'CIBW_TEST_COMMAND=cmd /c "mkdir tmp_for_test && xcopy /E /I CPT\\tests tmp_for_test\\tests && pytest tmp_for_test/tests"' >> $GITHUB_ENV - name: Prepare test command for Unix-like if: matrix.os != 'windows-latest' From 0b20e4a947fc0a8e665032ef85c8d42365453632 Mon Sep 17 00:00:00 2001 From: Louis Fruleux Date: Fri, 1 Aug 2025 14:26:46 +0200 Subject: [PATCH 12/13] change test command --- .github/workflows/publish-pypi.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index cf170a7..7c3e70b 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -170,7 +170,7 @@ jobs: # Maybe fix `from .cpt import cpt`, so we can test wherever the built wheel is? - name: Prepare test command for Windows if: matrix.os == 'windows-latest' - run: echo 'CIBW_TEST_COMMAND=cmd /c "mkdir tmp_for_test && xcopy /E /I CPT\\tests tmp_for_test\\tests && pytest tmp_for_test/tests"' >> $GITHUB_ENV + run: echo 'CIBW_TEST_COMMAND=cmd /c "mkdir tmp_for_test && xcopy /E /I {project}\\tests tmp_for_test\\tests && pytest tmp_for_test/tests"' >> $GITHUB_ENV - name: Prepare test command for Unix-like if: matrix.os != 'windows-latest' @@ -185,8 +185,6 @@ jobs: CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }} CIBW_BEFORE_TEST: ${{ matrix.os != 'windows-latest' && 'CC=gcc CXX=g++' || '' }} CIBW_TEST_REQUIRES: pytest - # CIBW_TEST_COMMAND is defined above. - CIBW_TEST_COMMAND: ${{ matrix.os == 'windows-latest' && 'cmd /c "mkdir tmp_for_test && xcopy /E /I tests tmp_for_test\\tests && pytest tmp_for_test/tests"' || 'bash -c \"mkdir -p tmp_for_test && cp -r tests tmp_for_test && pytest tmp_for_test/tests\"' }} CIBW_BUILD_VERBOSITY: 1 CIBW_ENVIRONMENT_MACOS: ${{ format('MACOSX_DEPLOYMENT_TARGET={0}', matrix.deployment_target) }} CIBW_ENABLE: cpython-freethreading From 1e3357842feefcd290ca019e74092621c76b222d Mon Sep 17 00:00:00 2001 From: Louis Fruleux Date: Fri, 1 Aug 2025 14:36:00 +0200 Subject: [PATCH 13/13] enable windows ARM --- .github/workflows/publish-pypi.yml | 263 ++++++++++++++++------------- 1 file changed, 143 insertions(+), 120 deletions(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 7c3e70b..9924a91 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -36,126 +36,149 @@ jobs: python: 314t platform_id: win_amd64 - # # Linux 64 bit manylinux_2_28 - # - os: ubuntu-latest - # python: 310 - # platform_id: manylinux_x86_64 - # manylinux_image: manylinux_2_28 - # - os: ubuntu-latest - # python: 311 - # platform_id: manylinux_x86_64 - # manylinux_image: manylinux_2_28 - # - os: ubuntu-latest - # python: 312 - # platform_id: manylinux_x86_64 - # manylinux_image: manylinux_2_28 - # - os: ubuntu-latest - # python: 313 - # platform_id: manylinux_x86_64 - # manylinux_image: manylinux_2_28 - # - os: ubuntu-latest - # python: 313t - # platform_id: manylinux_x86_64 - # manylinux_image: manylinux_2_28 - # - os: ubuntu-latest - # python: 314 - # platform_id: manylinux_x86_64 - # manylinux_image: manylinux_2_28 - # - os: ubuntu-latest - # python: 314t - # platform_id: manylinux_x86_64 - # manylinux_image: manylinux_2_28 - - # # Linux ARM 64 bit manylinux_2_28 - # - os: ubuntu-24.04-arm - # python: 310 - # platform_id: manylinux_aarch64 - # manylinux_image: manylinux_2_28 - # - os: ubuntu-24.04-arm - # python: 311 - # platform_id: manylinux_aarch64 - # manylinux_image: manylinux_2_28 - # - os: ubuntu-24.04-arm - # python: 312 - # platform_id: manylinux_aarch64 - # manylinux_image: manylinux_2_28 - # - os: ubuntu-24.04-arm - # python: 313 - # platform_id: manylinux_aarch64 - # manylinux_image: manylinux_2_28 - # - os: ubuntu-24.04-arm - # python: 313t - # platform_id: manylinux_aarch64 - # manylinux_image: manylinux_2_28 - # - os: ubuntu-24.04-arm - # python: 314 - # platform_id: manylinux_aarch64 - # manylinux_image: manylinux_2_28 - # - os: ubuntu-24.04-arm - # python: 314t - # platform_id: manylinux_aarch64 - # manylinux_image: manylinux_2_28 - - # # MacOS x86_64 - # - os: macos-13 - # python: 310 - # platform_id: macosx_x86_64 - # deployment_target: 13.0 - # - os: macos-13 - # python: 311 - # platform_id: macosx_x86_64 - # deployment_target: 13.0 - # - os: macos-13 - # python: 312 - # platform_id: macosx_x86_64 - # deployment_target: 13.0 - # - os: macos-13 - # python: 313 - # platform_id: macosx_x86_64 - # deployment_target: 13.0 - # - os: macos-13 - # python: 313t - # platform_id: macosx_x86_64 - # deployment_target: 13.0 - # - os: macos-13 - # python: 314 - # platform_id: macosx_x86_64 - # deployment_target: 13.0 - # - os: macos-13 - # python: 314t - # platform_id: macosx_x86_64 - # deployment_target: 13.0 - - - # # MacOS ARM - # - os: macos-14 - # python: 310 - # platform_id: macosx_arm64 - # deployment_target: 14.0 - # - os: macos-14 - # python: 311 - # platform_id: macosx_arm64 - # deployment_target: 14.0 - # - os: macos-14 - # python: 312 - # platform_id: macosx_arm64 - # deployment_target: 14.0 - # - os: macos-14 - # python: 313 - # platform_id: macosx_arm64 - # deployment_target: 14.0 - # - os: macos-14 - # python: 313t - # platform_id: macosx_arm64 - # deployment_target: 14.0 - # - os: macos-14 - # python: 314 - # platform_id: macosx_arm64 - # deployment_target: 14.0 - # - os: macos-14 - # python: 314t - # platform_id: macosx_arm64 - # deployment_target: 14.0 + # Windows ARM + - os: windows-11-arm + python: 310 + platform_id: win_arm64 + - os: windows-11-arm + python: 311 + platform_id: win_arm64 + - os: windows-11-arm + python: 312 + platform_id: win_arm64 + - os: windows-11-arm + python: 313 + platform_id: win_arm64 + - os: windows-11-arm + python: 313t + platform_id: win_arm64 + - os: windows-11-arm + python: 314 + platform_id: win_arm64 + - os: windows-11-arm + python: 314t + platform_id: win_arm64 + + # Linux 64 bit manylinux_2_28 + - os: ubuntu-latest + python: 310 + platform_id: manylinux_x86_64 + manylinux_image: manylinux_2_28 + - os: ubuntu-latest + python: 311 + platform_id: manylinux_x86_64 + manylinux_image: manylinux_2_28 + - os: ubuntu-latest + python: 312 + platform_id: manylinux_x86_64 + manylinux_image: manylinux_2_28 + - os: ubuntu-latest + python: 313 + platform_id: manylinux_x86_64 + manylinux_image: manylinux_2_28 + - os: ubuntu-latest + python: 313t + platform_id: manylinux_x86_64 + manylinux_image: manylinux_2_28 + - os: ubuntu-latest + python: 314 + platform_id: manylinux_x86_64 + manylinux_image: manylinux_2_28 + - os: ubuntu-latest + python: 314t + platform_id: manylinux_x86_64 + manylinux_image: manylinux_2_28 + + # Linux ARM 64 bit manylinux_2_28 + - os: ubuntu-24.04-arm + python: 310 + platform_id: manylinux_aarch64 + manylinux_image: manylinux_2_28 + - os: ubuntu-24.04-arm + python: 311 + platform_id: manylinux_aarch64 + manylinux_image: manylinux_2_28 + - os: ubuntu-24.04-arm + python: 312 + platform_id: manylinux_aarch64 + manylinux_image: manylinux_2_28 + - os: ubuntu-24.04-arm + python: 313 + platform_id: manylinux_aarch64 + manylinux_image: manylinux_2_28 + - os: ubuntu-24.04-arm + python: 313t + platform_id: manylinux_aarch64 + manylinux_image: manylinux_2_28 + - os: ubuntu-24.04-arm + python: 314 + platform_id: manylinux_aarch64 + manylinux_image: manylinux_2_28 + - os: ubuntu-24.04-arm + python: 314t + platform_id: manylinux_aarch64 + manylinux_image: manylinux_2_28 + + # MacOS x86_64 + - os: macos-13 + python: 310 + platform_id: macosx_x86_64 + deployment_target: 13.0 + - os: macos-13 + python: 311 + platform_id: macosx_x86_64 + deployment_target: 13.0 + - os: macos-13 + python: 312 + platform_id: macosx_x86_64 + deployment_target: 13.0 + - os: macos-13 + python: 313 + platform_id: macosx_x86_64 + deployment_target: 13.0 + - os: macos-13 + python: 313t + platform_id: macosx_x86_64 + deployment_target: 13.0 + - os: macos-13 + python: 314 + platform_id: macosx_x86_64 + deployment_target: 13.0 + - os: macos-13 + python: 314t + platform_id: macosx_x86_64 + deployment_target: 13.0 + + + # MacOS ARM + - os: macos-14 + python: 310 + platform_id: macosx_arm64 + deployment_target: 14.0 + - os: macos-14 + python: 311 + platform_id: macosx_arm64 + deployment_target: 14.0 + - os: macos-14 + python: 312 + platform_id: macosx_arm64 + deployment_target: 14.0 + - os: macos-14 + python: 313 + platform_id: macosx_arm64 + deployment_target: 14.0 + - os: macos-14 + python: 313t + platform_id: macosx_arm64 + deployment_target: 14.0 + - os: macos-14 + python: 314 + platform_id: macosx_arm64 + deployment_target: 14.0 + - os: macos-14 + python: 314t + platform_id: macosx_arm64 + deployment_target: 14.0 steps: - name: Checkout CPT