Skip to content

Commit e172cb9

Browse files
committed
Fix Linux/Windows bridge_example: skip 32-bit wheels + link Windows abi3 stub
Three CI failures from the previous run, all in the Linux + Windows bridge_example matrix: Linux: Picked the wrong wheel — cibuildwheel produces both x86_64 AND i686 variants for ubuntu hosts, and `ls | head -n1` lands on dart_bridge-*manylinux*_i686.whl alphabetically. pip then refuses with "is not a supported wheel on this platform". Fix: skip i686 in [tool.cibuildwheel] so only x86_64 ships. (Also pre-emptively skip win32 for symmetry; Flet desktop is 64-bit only.) Windows: `LINK : fatal error LNK1104: cannot open file 'python314_d.lib'` — find_package(Python3 ... Development.Module) picks the version- specific debug-config import lib in Debug builds, but python-build- standalone for Windows doesn't ship a Debug variant. Fix: native/CMakeLists.txt — on WIN32, link against python3.lib (the abi3 stable-ABI stub) directly. It's version-agnostic and has no debug variant requirement, matching our Py_LIMITED_API choice in dart_bridge.c. iOS (separate flake): iOS 3.14 passed in 12m26s but iOS 3.12 and 3.13 hung past 1 hour in the "Package + run integration test" step. Adding timeout-minutes: 25 to both bridge_example_ios in ci.yml and test_bridge_example_ios in the throwaway so future hangs fail loudly within 25 min instead of consuming the 6-hour job default. Root cause TBD — likely a CocoaPods/simulator zombie since one of three Python versions succeeded.
1 parent 446434e commit e172cb9

4 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ jobs:
269269
bridge_example_ios:
270270
name: Test bridge example on iOS (Python ${{ matrix.python_version }})
271271
runs-on: macos-latest
272+
timeout-minutes: 25
272273
strategy:
273274
fail-fast: false
274275
matrix:

.github/workflows/test-bridge-build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ jobs:
147147
test_bridge_example_ios:
148148
name: Bridge example iOS round-trip (Python ${{ matrix.python_version }})
149149
runs-on: macos-latest
150+
timeout-minutes: 25
150151
strategy:
151152
fail-fast: false
152153
matrix:

src/serious_python_bridge/native/CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,17 @@ project(flet_bridge VERSION 0.0.1 LANGUAGES C)
1818
if(NOT DEFINED FLET_BRIDGE_PYTHON_INCLUDE_DIRS)
1919
find_package(Python3 REQUIRED COMPONENTS Development.Module)
2020
set(FLET_BRIDGE_PYTHON_INCLUDE_DIRS ${Python3_INCLUDE_DIRS})
21-
set(FLET_BRIDGE_PYTHON_LIBRARIES Python3::Module)
21+
if(WIN32)
22+
# Python3::Module picks pythonXY.lib (or pythonXY_d.lib in Debug builds),
23+
# but python-build-standalone for Windows doesn't ship a Debug variant
24+
# so Flutter's debug builds fail with LNK1104. Link the abi3 stable-ABI
25+
# stub python3.lib instead — it's version-agnostic AND has no debug
26+
# variant requirement (matches our Py_LIMITED_API choice).
27+
get_filename_component(_flet_bridge_python_root "${Python3_INCLUDE_DIRS}" DIRECTORY)
28+
set(FLET_BRIDGE_PYTHON_LIBRARIES "${_flet_bridge_python_root}/libs/python3.lib")
29+
else()
30+
set(FLET_BRIDGE_PYTHON_LIBRARIES Python3::Module)
31+
endif()
2232
endif()
2333

2434
add_library(flet_bridge SHARED

src/serious_python_bridge/python/pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,6 @@ Issues = "https://github.com/flet-dev/serious-python/issues"
3131
# Limited API / abi3: a single wheel built against Python 3.12's stable ABI
3232
# loads on any Python 3.12+ minor version, so we only need cp312-* here.
3333
build = "cp312-*"
34-
skip = ["pp*", "*-musllinux_*"]
34+
# Flet targets only 64-bit desktop, so skip 32-bit (i686 / win32). Also skip
35+
# PyPy and musllinux (alternative libc, not what python-build-standalone uses).
36+
skip = ["pp*", "*-musllinux_*", "*-linux_i686", "*-win32"]

0 commit comments

Comments
 (0)