Skip to content

Commit

Permalink
[Py] disable stub generation on 32-bit Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tttapa committed Nov 15, 2024
1 parent 6a02158 commit 90a77b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/wheel-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,12 @@ jobs:
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/scripts/toolchains/Win-${{ matrix.arch }}.cmake
# Download stubs
- name: Download stubs
if: ${{ matrix.arch == 'ARM64' }}
if: ${{ matrix.arch != 'AMD64' || startsWith(matrix.python-id, 'pp') }}
uses: actions/download-artifact@v4
with:
name: stubs
- name: Extract stubs
if: ${{ matrix.arch == 'ARM64' }}
if: ${{ matrix.arch != 'AMD64' || startsWith(matrix.python-id, 'pp') }}
run: tar xf stubs.tar
- name: Build wheels
uses: pypa/cibuildwheel@7940a4c0e76eb2030e473a5f864f291f63ee879b
Expand Down
4 changes: 3 additions & 1 deletion QPALM/interfaces/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ endif()

# Generate stubs for the Python module
set(QPALM_WITH_PY_STUBS_DEFAULT On)
if (CMAKE_CROSSCOMPILING OR NOT Python3_INTERPRETER_ID STREQUAL "Python")
if (CMAKE_CROSSCOMPILING
OR NOT Python3_INTERPRETER_ID STREQUAL "Python"
OR CMAKE_SYSTEM_PROCESSOR STREQUAL "x86")
set(QPALM_WITH_PY_STUBS_DEFAULT Off)
endif()
option(QPALM_WITH_PY_STUBS
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ requires = [
"py-build-cmake~=0.2.0a14",
"pybind11==2.13.6",
"pybind11-stubgen==2.5.1",
"numpy>=1.19,<3; implementation_name=='cpython'",
"scipy>=1.6,<2; implementation_name=='cpython'",
"numpy>=1.19,<3; implementation_name=='cpython' and platform_machine!='x86'",
"scipy>=1.6,<2; implementation_name=='cpython' and platform_machine!='x86'",
# Temporarily pinned until mypy support for NumPy 2.0 is fixed:
# https://github.com/python/mypy/issues/17396
"mypy~=1.4.1",
Expand Down

0 comments on commit 90a77b1

Please sign in to comment.