From 1a88bec89550ff1a300b1fb931ab302873fc66ee Mon Sep 17 00:00:00 2001 From: Vineet Bansal Date: Wed, 10 Jun 2026 14:23:09 -0400 Subject: [PATCH 1/8] building on cp314t for windows --- backend/cuda/cibuildwheel.toml | 2 +- backend/mkl/cibuildwheel.toml | 2 +- cibuildwheel.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/cuda/cibuildwheel.toml b/backend/cuda/cibuildwheel.toml index a0e7bed5..69029c53 100644 --- a/backend/cuda/cibuildwheel.toml +++ b/backend/cuda/cibuildwheel.toml @@ -1,6 +1,6 @@ [tool.cibuildwheel] build = "cp3*" -skip = ["cp314t-win_amd64", "*-win32", "*-manylinux_i686", "*-musllinux_*"] +skip = ["*-win32", "*-manylinux_i686", "*-musllinux_*"] build-verbosity = 1 before-build = "rm -rf {package}/osqp_sources/build" repair-wheel-command = "" diff --git a/backend/mkl/cibuildwheel.toml b/backend/mkl/cibuildwheel.toml index 681ca99e..4c445ad6 100644 --- a/backend/mkl/cibuildwheel.toml +++ b/backend/mkl/cibuildwheel.toml @@ -1,6 +1,6 @@ [tool.cibuildwheel] build = "cp3*" -skip = ["cp314t-win_amd64", "*-win32", "*-manylinux_i686", "*-musllinux_*"] +skip = ["*-win32", "*-manylinux_i686", "*-musllinux_*"] build-verbosity = 1 before-build = "rm -rf {package}/osqp_sources/build" diff --git a/cibuildwheel.toml b/cibuildwheel.toml index e80ad134..d3ae2a33 100644 --- a/cibuildwheel.toml +++ b/cibuildwheel.toml @@ -1,6 +1,6 @@ [tool.cibuildwheel] build = "cp3*" -skip = ["cp314t-win_amd64", "*-win32", "*-manylinux_i686", "*-musllinux_*"] +skip = ["*-win32", "*-manylinux_i686", "*-musllinux_*"] build-verbosity = 1 before-build = "rm -rf {package}/osqp_sources/build" # Install CPU-only version of torch beforehand since that allows cibuildwheel From b15dea9e311f7975a8f3e142155fa84d1438ce6a Mon Sep 17 00:00:00 2001 From: Vineet Bansal Date: Wed, 10 Jun 2026 14:46:27 -0400 Subject: [PATCH 2/8] linking fix by claude --- CMakeLists.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 15f0013c..7a966cc3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,23 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/bindings.cpp.in pybind11_add_module(${OSQP_EXT_MODULE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/src/bindings.cpp) install(TARGETS ${OSQP_EXT_MODULE_NAME} DESTINATION . COMPONENT python) +# Free-threaded (no-GIL) Python on Windows ships only pythonXYt.lib. The MSVC +# auto-link pragma in pyconfig.h selects pythonXY.lib (no "t") unless +# Py_GIL_DISABLED is defined at compile time, producing a spurious LNK1104 for +# the non-existent pythonXY.lib when building cp3XXt wheels. Mirror what +# setuptools does: ask the interpreter and define the macro ourselves so the +# correct import library is linked. No-op on non-free-threaded interpreters. +execute_process( + COMMAND "${Python_EXECUTABLE}" -c + "import sysconfig;print(1 if sysconfig.get_config_var('Py_GIL_DISABLED') else 0)" + OUTPUT_VARIABLE OSQP_PY_GIL_DISABLED + OUTPUT_STRIP_TRAILING_WHITESPACE +) +if(OSQP_PY_GIL_DISABLED STREQUAL "1") + message(STATUS "Free-threaded Python detected; defining Py_GIL_DISABLED") + target_compile_definitions(${OSQP_EXT_MODULE_NAME} PRIVATE Py_GIL_DISABLED=1) +endif() + # TODO: We shouldn't have to do this once the interfaces are set up correctly if(${OSQP_ALGEBRA_BACKEND} STREQUAL "builtin") target_link_libraries(ext_builtin PUBLIC pybind11::module osqpstatic) From ff0cdecc614c1dfeb7a37273c6fe406a7dc5891b Mon Sep 17 00:00:00 2001 From: Vineet Bansal Date: Wed, 10 Jun 2026 16:58:11 -0400 Subject: [PATCH 3/8] claude+henry fixes --- CMakeLists.txt | 40 +++++++++++++++++++++++++++------------- pyproject.toml | 5 +++++ 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a966cc3..9de8e044 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,28 @@ include(FetchContent) # 03/05/24 - Use modern python discovery set(PYBIND11_FINDPYTHON "ON") +# Free-threaded (no-GIL) CPython on Windows ships only pythonXYt.lib (note the +# trailing "t"); the regular pythonXY.lib is absent. Unless FindPython is asked +# to search the gil_disabled ABI, it resolves the extension module's import +# library to the missing pythonXY.lib and the link fails with +# "LNK1104: cannot open file 'pythonXY.lib'". scikit-build-core seeds +# Python_EXECUTABLE in the initial cache, so detect a free-threaded interpreter +# here and steer the FindPython invocation that pybind11 performs below to the +# correct ABI. The Python_FIND_ABI 4-tuple's last element selects gil_disabled +# (requires CMake >= 3.30). No-op on regular interpreters. +if(DEFINED Python_EXECUTABLE) + execute_process( + COMMAND "${Python_EXECUTABLE}" -c + "import sysconfig;print(1 if sysconfig.get_config_var('Py_GIL_DISABLED') else 0)" + OUTPUT_VARIABLE OSQP_PY_GIL_DISABLED + OUTPUT_STRIP_TRAILING_WHITESPACE + ) +endif() +if(WIN32 AND OSQP_PY_GIL_DISABLED STREQUAL "1") + message(STATUS "Free-threaded Python detected; searching gil_disabled ABI (pythonXYt.lib)") + set(Python_FIND_ABI "OFF" "ANY" "ANY" "ON") +endif() + find_package(pybind11 CONFIG REQUIRED) # 03/05/24 - Workaround because OSQP CMakeLists.txt is using old variable names @@ -41,20 +63,12 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/bindings.cpp.in pybind11_add_module(${OSQP_EXT_MODULE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/src/bindings.cpp) install(TARGETS ${OSQP_EXT_MODULE_NAME} DESTINATION . COMPONENT python) -# Free-threaded (no-GIL) Python on Windows ships only pythonXYt.lib. The MSVC -# auto-link pragma in pyconfig.h selects pythonXY.lib (no "t") unless -# Py_GIL_DISABLED is defined at compile time, producing a spurious LNK1104 for -# the non-existent pythonXY.lib when building cp3XXt wheels. Mirror what -# setuptools does: ask the interpreter and define the macro ourselves so the -# correct import library is linked. No-op on non-free-threaded interpreters. -execute_process( - COMMAND "${Python_EXECUTABLE}" -c - "import sysconfig;print(1 if sysconfig.get_config_var('Py_GIL_DISABLED') else 0)" - OUTPUT_VARIABLE OSQP_PY_GIL_DISABLED - OUTPUT_STRIP_TRAILING_WHITESPACE -) +# Also define Py_GIL_DISABLED at compile time on free-threaded interpreters. +# The MSVC auto-link pragma in pyconfig.h selects pythonXY.lib (no "t") unless +# this macro is set, and the extension must be built with the same flag the +# interpreter uses to keep the C ABI in sync. Reuses OSQP_PY_GIL_DISABLED +# computed above. No-op on non-free-threaded interpreters. if(OSQP_PY_GIL_DISABLED STREQUAL "1") - message(STATUS "Free-threaded Python detected; defining Py_GIL_DISABLED") target_compile_definitions(${OSQP_EXT_MODULE_NAME} PRIVATE Py_GIL_DISABLED=1) endif() diff --git a/pyproject.toml b/pyproject.toml index 4cf3c55c..25543847 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,6 +70,11 @@ minimum-version = "0.8" wheel.install-dir = "osqp" sdist.include = ["src/osqp/_version.py"] +[[tool.scikit-build.overrides]] +if.platform-system="win32" +if.abi-flags="t" +cmake.version = ">=4.2" + [tool.scikit-build.cmake.define] OSQP_ALGEBRA_BACKEND = "builtin" OSQP_EXT_MODULE_NAME = "ext_builtin" From 0f15da5d0bca0b3ade79f56ae4e1c3c132a24ad5 Mon Sep 17 00:00:00 2001 From: Vineet Bansal Date: Fri, 12 Jun 2026 10:07:49 -0400 Subject: [PATCH 4/8] restricted CI plats while debugging --- .github/workflows/build_cuda.yml | 36 --------------------------- .github/workflows/build_default.yml | 9 ------- .github/workflows/build_mkl.yml | 38 ----------------------------- .github/workflows/build_wasm.yml | 33 ------------------------- .github/workflows/pre_commit.yml | 36 --------------------------- backend/cuda/cibuildwheel.toml | 2 +- backend/mkl/cibuildwheel.toml | 2 +- cibuildwheel.toml | 2 +- 8 files changed, 3 insertions(+), 155 deletions(-) delete mode 100644 .github/workflows/build_cuda.yml delete mode 100644 .github/workflows/build_mkl.yml delete mode 100644 .github/workflows/build_wasm.yml delete mode 100644 .github/workflows/pre_commit.yml diff --git a/.github/workflows/build_cuda.yml b/.github/workflows/build_cuda.yml deleted file mode 100644 index 3b627500..00000000 --- a/.github/workflows/build_cuda.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Build CUDA Linux - -on: - push: - branches: - - master - tags: - - '*' - pull_request: - branches: - - master - -jobs: - build_wheels: - name: Build wheel on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - - steps: - - uses: actions/checkout@master - - - name: Build wheels - uses: pypa/cibuildwheel@v2.23 - with: - package-dir: backend/cuda - config-file: backend/cuda/cibuildwheel.toml - output-dir: wheelhouse - - - name: Upload artifacts to github - uses: actions/upload-artifact@v5 - with: - name: wheels-cuda-${{ matrix.os }} - path: ./wheelhouse diff --git a/.github/workflows/build_default.yml b/.github/workflows/build_default.yml index d2e152b4..4df591fe 100644 --- a/.github/workflows/build_default.yml +++ b/.github/workflows/build_default.yml @@ -40,17 +40,8 @@ jobs: fail-fast: false matrix: include: - - os: ubuntu-latest - cibw_archs: "x86_64" - - os: ubuntu-24.04-arm - cibw_archs: "auto" - os: windows-2022 cibw_archs: "auto64" - # Include macos-15-intel to get Intel x86_64 macs and macos-latest to get the Aaarch64 macs - - os: macos-15-intel - cibw_archs: "x86_64" - - os: macos-latest - cibw_archs: "arm64" steps: - uses: actions/checkout@master diff --git a/.github/workflows/build_mkl.yml b/.github/workflows/build_mkl.yml deleted file mode 100644 index 496b7465..00000000 --- a/.github/workflows/build_mkl.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Build MKL Mac/Linux - -on: - push: - branches: - - master - tags: - - '*' - pull_request: - branches: - - master - -jobs: - build_wheels: - name: Build wheel on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - # macos-latest now uses arm64 runners, but MKL is x86_64 only, so restrict to the macos-15-intel runners - # to get x86_64 architecture. - os: [ubuntu-latest, macos-15-intel] - - steps: - - uses: actions/checkout@master - - - name: Build wheels - uses: pypa/cibuildwheel@v3.3.1 - with: - package-dir: backend/mkl - config-file: backend/mkl/cibuildwheel.toml - output-dir: wheelhouse - - - name: Upload artifacts to github - uses: actions/upload-artifact@v5 - with: - name: wheels-mkl-${{ matrix.os }} - path: ./wheelhouse diff --git a/.github/workflows/build_wasm.yml b/.github/workflows/build_wasm.yml deleted file mode 100644 index 7f516ff8..00000000 --- a/.github/workflows/build_wasm.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build WASM - -on: - push: - branches: - - master - tags: - - '*' - pull_request: - branches: - - master - -jobs: - build_wheels: - name: Build wasm32 wheels - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@master - - - name: Build wheels - uses: pypa/cibuildwheel@v3.3.1 - env: - CIBW_PLATFORM: pyodide - with: - config-file: cibuildwheel.toml - output-dir: wheelhouse - - - name: Upload artifacts to github - uses: actions/upload-artifact@v5 - with: - name: wheels-wasm32 - path: ./wheelhouse diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.yml deleted file mode 100644 index 8d9a00df..00000000 --- a/.github/workflows/pre_commit.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Pre-commit checks - -on: - push: - # Run this workflow on all branches because it is good to flag these errors - # and this workflow is "cheap" - branches: - - '*' - pull_request: - branches: - - master - -jobs: - precommit: - name: Pre-commit checks - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest] - - steps: - - uses: actions/checkout@master - - - uses: actions/setup-python@v6 - name: Install Python - with: - python-version: '3.9' - - - name: Install package with dev dependencies - run: | - python -m pip install .[dev] - - - name: Pre-commit checks - run: | - pre-commit run --all-files diff --git a/backend/cuda/cibuildwheel.toml b/backend/cuda/cibuildwheel.toml index 69029c53..77270131 100644 --- a/backend/cuda/cibuildwheel.toml +++ b/backend/cuda/cibuildwheel.toml @@ -1,5 +1,5 @@ [tool.cibuildwheel] -build = "cp3*" +build = "cp314t*" skip = ["*-win32", "*-manylinux_i686", "*-musllinux_*"] build-verbosity = 1 before-build = "rm -rf {package}/osqp_sources/build" diff --git a/backend/mkl/cibuildwheel.toml b/backend/mkl/cibuildwheel.toml index 4c445ad6..cb27afe6 100644 --- a/backend/mkl/cibuildwheel.toml +++ b/backend/mkl/cibuildwheel.toml @@ -1,5 +1,5 @@ [tool.cibuildwheel] -build = "cp3*" +build = "cp314t*" skip = ["*-win32", "*-manylinux_i686", "*-musllinux_*"] build-verbosity = 1 before-build = "rm -rf {package}/osqp_sources/build" diff --git a/cibuildwheel.toml b/cibuildwheel.toml index d3ae2a33..13988b03 100644 --- a/cibuildwheel.toml +++ b/cibuildwheel.toml @@ -1,5 +1,5 @@ [tool.cibuildwheel] -build = "cp3*" +build = "cp314t*" skip = ["*-win32", "*-manylinux_i686", "*-musllinux_*"] build-verbosity = 1 before-build = "rm -rf {package}/osqp_sources/build" From caff5ca4fbdaadf63b17afd00e684d7bafb79062 Mon Sep 17 00:00:00 2001 From: Vineet Bansal Date: Fri, 12 Jun 2026 10:15:33 -0400 Subject: [PATCH 5/8] claude-suggested fix --- CMakeLists.txt | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9de8e044..065eb1d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,14 +21,9 @@ include(FetchContent) set(PYBIND11_FINDPYTHON "ON") # Free-threaded (no-GIL) CPython on Windows ships only pythonXYt.lib (note the -# trailing "t"); the regular pythonXY.lib is absent. Unless FindPython is asked -# to search the gil_disabled ABI, it resolves the extension module's import -# library to the missing pythonXY.lib and the link fails with -# "LNK1104: cannot open file 'pythonXY.lib'". scikit-build-core seeds +# trailing "t"); the regular pythonXY.lib is absent. scikit-build-core seeds # Python_EXECUTABLE in the initial cache, so detect a free-threaded interpreter -# here and steer the FindPython invocation that pybind11 performs below to the -# correct ABI. The Python_FIND_ABI 4-tuple's last element selects gil_disabled -# (requires CMake >= 3.30). No-op on regular interpreters. +# up front and handle the two ways a stale "pythonXY.lib" reference creeps in. if(DEFINED Python_EXECUTABLE) execute_process( COMMAND "${Python_EXECUTABLE}" -c @@ -37,9 +32,25 @@ if(DEFINED Python_EXECUTABLE) OUTPUT_STRIP_TRAILING_WHITESPACE ) endif() -if(WIN32 AND OSQP_PY_GIL_DISABLED STREQUAL "1") - message(STATUS "Free-threaded Python detected; searching gil_disabled ABI (pythonXYt.lib)") - set(Python_FIND_ABI "OFF" "ANY" "ANY" "ON") +if(OSQP_PY_GIL_DISABLED STREQUAL "1") + message(STATUS "Free-threaded Python detected; defining Py_GIL_DISABLED for all targets") + + # (1) Define Py_GIL_DISABLED for EVERY translation unit that includes + # , not just the pybind11 module. OSQP's C sources pull in + # cmake/memory.h and cmake/printing.h (which include ) and are + # compiled into osqpstatic/OSQPLIB. Without the macro, the MSVC auto-link + # pragma in pyconfig.h bakes a "pythonXY.lib" (no "t") dependency into those + # objects, and the final link can't satisfy it -> LNK1104. A directory-scope + # definition set before the OSQP subproject is added reaches all targets. + add_compile_definitions(Py_GIL_DISABLED=1) + + # (2) Steer the FindPython invocation that pybind11 performs below to the + # gil_disabled ABI so the module's own import library resolves to + # pythonXYt.lib. The Python_FIND_ABI 4-tuple's last element selects + # gil_disabled (requires CMake >= 3.30). Windows-only ABI naming concern. + if(WIN32) + set(Python_FIND_ABI "OFF" "ANY" "ANY" "ON") + endif() endif() find_package(pybind11 CONFIG REQUIRED) @@ -63,15 +74,6 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/bindings.cpp.in pybind11_add_module(${OSQP_EXT_MODULE_NAME} ${CMAKE_CURRENT_BINARY_DIR}/src/bindings.cpp) install(TARGETS ${OSQP_EXT_MODULE_NAME} DESTINATION . COMPONENT python) -# Also define Py_GIL_DISABLED at compile time on free-threaded interpreters. -# The MSVC auto-link pragma in pyconfig.h selects pythonXY.lib (no "t") unless -# this macro is set, and the extension must be built with the same flag the -# interpreter uses to keep the C ABI in sync. Reuses OSQP_PY_GIL_DISABLED -# computed above. No-op on non-free-threaded interpreters. -if(OSQP_PY_GIL_DISABLED STREQUAL "1") - target_compile_definitions(${OSQP_EXT_MODULE_NAME} PRIVATE Py_GIL_DISABLED=1) -endif() - # TODO: We shouldn't have to do this once the interfaces are set up correctly if(${OSQP_ALGEBRA_BACKEND} STREQUAL "builtin") target_link_libraries(ext_builtin PUBLIC pybind11::module osqpstatic) From d029b6204b05f1b3568f6a8848237766d004e11c Mon Sep 17 00:00:00 2001 From: Vineet Bansal Date: Fri, 12 Jun 2026 10:28:20 -0400 Subject: [PATCH 6/8] removed a parallel fix to isolate the correct one --- pyproject.toml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 25543847..4cf3c55c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,11 +70,6 @@ minimum-version = "0.8" wheel.install-dir = "osqp" sdist.include = ["src/osqp/_version.py"] -[[tool.scikit-build.overrides]] -if.platform-system="win32" -if.abi-flags="t" -cmake.version = ">=4.2" - [tool.scikit-build.cmake.define] OSQP_ALGEBRA_BACKEND = "builtin" OSQP_EXT_MODULE_NAME = "ext_builtin" From 4a1eb0d66a8f5e609570c0f004b01217657d2d02 Mon Sep 17 00:00:00 2001 From: Vineet Bansal Date: Fri, 12 Jun 2026 10:48:27 -0400 Subject: [PATCH 7/8] enabled all --- .github/workflows/build_cuda.yml | 36 +++++++++++++++++++++++++++ .github/workflows/build_default.yml | 9 +++++++ .github/workflows/build_mkl.yml | 38 +++++++++++++++++++++++++++++ .github/workflows/build_wasm.yml | 33 +++++++++++++++++++++++++ .github/workflows/pre_commit.yml | 36 +++++++++++++++++++++++++++ backend/cuda/cibuildwheel.toml | 2 +- backend/mkl/cibuildwheel.toml | 2 +- cibuildwheel.toml | 2 +- 8 files changed, 155 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/build_cuda.yml create mode 100644 .github/workflows/build_mkl.yml create mode 100644 .github/workflows/build_wasm.yml create mode 100644 .github/workflows/pre_commit.yml diff --git a/.github/workflows/build_cuda.yml b/.github/workflows/build_cuda.yml new file mode 100644 index 00000000..3b627500 --- /dev/null +++ b/.github/workflows/build_cuda.yml @@ -0,0 +1,36 @@ +name: Build CUDA Linux + +on: + push: + branches: + - master + tags: + - '*' + pull_request: + branches: + - master + +jobs: + build_wheels: + name: Build wheel on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@master + + - name: Build wheels + uses: pypa/cibuildwheel@v2.23 + with: + package-dir: backend/cuda + config-file: backend/cuda/cibuildwheel.toml + output-dir: wheelhouse + + - name: Upload artifacts to github + uses: actions/upload-artifact@v5 + with: + name: wheels-cuda-${{ matrix.os }} + path: ./wheelhouse diff --git a/.github/workflows/build_default.yml b/.github/workflows/build_default.yml index 4df591fe..d2e152b4 100644 --- a/.github/workflows/build_default.yml +++ b/.github/workflows/build_default.yml @@ -40,8 +40,17 @@ jobs: fail-fast: false matrix: include: + - os: ubuntu-latest + cibw_archs: "x86_64" + - os: ubuntu-24.04-arm + cibw_archs: "auto" - os: windows-2022 cibw_archs: "auto64" + # Include macos-15-intel to get Intel x86_64 macs and macos-latest to get the Aaarch64 macs + - os: macos-15-intel + cibw_archs: "x86_64" + - os: macos-latest + cibw_archs: "arm64" steps: - uses: actions/checkout@master diff --git a/.github/workflows/build_mkl.yml b/.github/workflows/build_mkl.yml new file mode 100644 index 00000000..496b7465 --- /dev/null +++ b/.github/workflows/build_mkl.yml @@ -0,0 +1,38 @@ +name: Build MKL Mac/Linux + +on: + push: + branches: + - master + tags: + - '*' + pull_request: + branches: + - master + +jobs: + build_wheels: + name: Build wheel on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + # macos-latest now uses arm64 runners, but MKL is x86_64 only, so restrict to the macos-15-intel runners + # to get x86_64 architecture. + os: [ubuntu-latest, macos-15-intel] + + steps: + - uses: actions/checkout@master + + - name: Build wheels + uses: pypa/cibuildwheel@v3.3.1 + with: + package-dir: backend/mkl + config-file: backend/mkl/cibuildwheel.toml + output-dir: wheelhouse + + - name: Upload artifacts to github + uses: actions/upload-artifact@v5 + with: + name: wheels-mkl-${{ matrix.os }} + path: ./wheelhouse diff --git a/.github/workflows/build_wasm.yml b/.github/workflows/build_wasm.yml new file mode 100644 index 00000000..7f516ff8 --- /dev/null +++ b/.github/workflows/build_wasm.yml @@ -0,0 +1,33 @@ +name: Build WASM + +on: + push: + branches: + - master + tags: + - '*' + pull_request: + branches: + - master + +jobs: + build_wheels: + name: Build wasm32 wheels + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + + - name: Build wheels + uses: pypa/cibuildwheel@v3.3.1 + env: + CIBW_PLATFORM: pyodide + with: + config-file: cibuildwheel.toml + output-dir: wheelhouse + + - name: Upload artifacts to github + uses: actions/upload-artifact@v5 + with: + name: wheels-wasm32 + path: ./wheelhouse diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.yml new file mode 100644 index 00000000..8d9a00df --- /dev/null +++ b/.github/workflows/pre_commit.yml @@ -0,0 +1,36 @@ +name: Pre-commit checks + +on: + push: + # Run this workflow on all branches because it is good to flag these errors + # and this workflow is "cheap" + branches: + - '*' + pull_request: + branches: + - master + +jobs: + precommit: + name: Pre-commit checks + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + + steps: + - uses: actions/checkout@master + + - uses: actions/setup-python@v6 + name: Install Python + with: + python-version: '3.9' + + - name: Install package with dev dependencies + run: | + python -m pip install .[dev] + + - name: Pre-commit checks + run: | + pre-commit run --all-files diff --git a/backend/cuda/cibuildwheel.toml b/backend/cuda/cibuildwheel.toml index 77270131..69029c53 100644 --- a/backend/cuda/cibuildwheel.toml +++ b/backend/cuda/cibuildwheel.toml @@ -1,5 +1,5 @@ [tool.cibuildwheel] -build = "cp314t*" +build = "cp3*" skip = ["*-win32", "*-manylinux_i686", "*-musllinux_*"] build-verbosity = 1 before-build = "rm -rf {package}/osqp_sources/build" diff --git a/backend/mkl/cibuildwheel.toml b/backend/mkl/cibuildwheel.toml index cb27afe6..4c445ad6 100644 --- a/backend/mkl/cibuildwheel.toml +++ b/backend/mkl/cibuildwheel.toml @@ -1,5 +1,5 @@ [tool.cibuildwheel] -build = "cp314t*" +build = "cp3*" skip = ["*-win32", "*-manylinux_i686", "*-musllinux_*"] build-verbosity = 1 before-build = "rm -rf {package}/osqp_sources/build" diff --git a/cibuildwheel.toml b/cibuildwheel.toml index 13988b03..d3ae2a33 100644 --- a/cibuildwheel.toml +++ b/cibuildwheel.toml @@ -1,5 +1,5 @@ [tool.cibuildwheel] -build = "cp314t*" +build = "cp3*" skip = ["*-win32", "*-manylinux_i686", "*-musllinux_*"] build-verbosity = 1 before-build = "rm -rf {package}/osqp_sources/build" From dca1feb2892f7c98ae928a19ced6b95c5cced2b9 Mon Sep 17 00:00:00 2001 From: Vineet Bansal Date: Fri, 12 Jun 2026 12:15:08 -0400 Subject: [PATCH 8/8] comments reduction [skip ci] --- CMakeLists.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 065eb1d9..d3c5ef6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,10 +20,6 @@ include(FetchContent) # 03/05/24 - Use modern python discovery set(PYBIND11_FINDPYTHON "ON") -# Free-threaded (no-GIL) CPython on Windows ships only pythonXYt.lib (note the -# trailing "t"); the regular pythonXY.lib is absent. scikit-build-core seeds -# Python_EXECUTABLE in the initial cache, so detect a free-threaded interpreter -# up front and handle the two ways a stale "pythonXY.lib" reference creeps in. if(DEFINED Python_EXECUTABLE) execute_process( COMMAND "${Python_EXECUTABLE}" -c