2424 # older flet whose transitive deps (e.g. msgpack) have wheels for the
2525 # target python_version / platform, leaving the two halves mismatched.
2626 FLET_VERSION : " 0.85.3"
27- # Python flet for the FFI-transport example is pulled from a git ref —
28- # FletDartBridgeServer isn't on PyPI yet. Source installs require
29- # SERIOUS_PYTHON_ALLOW_SOURCE_DISTRIBUTIONS=flet on mobile targets to
30- # bypass --only-binary :all:; see package_command.dart.
31- FLET_FFI_REQUIREMENT : " flet @ git+https://github.com/flet-dev/flet.git@dart-bridge#subdirectory=sdk/python/packages/flet"
27+ # Python flet for the FFI-transport example is pinned to a git ref —
28+ # FletDartBridgeServer isn't on PyPI yet. The git URL is given to pip via
29+ # --requirements, which would normally clone the whole flet repo (large)
30+ # inside pip itself. On Windows this can take 30+ minutes and looks like
31+ # a hang because pip emits no progress during git clone. So the FFI jobs
32+ # first do an explicit `git clone --depth 1` into ${{ runner.temp }}/flet
33+ # and then pass the local subpath as the requirement.
34+ FLET_GIT_REF : " dart-bridge"
35+ FLET_GIT_URL : " https://github.com/flet-dev/flet.git"
36+ # Source installs additionally require SERIOUS_PYTHON_ALLOW_SOURCE_DISTRIBUTIONS=flet
37+ # on mobile targets to bypass --only-binary :all:; see package_command.dart.
3238
3339jobs :
3440 macos :
@@ -266,6 +272,8 @@ jobs:
266272 flet_ffi_macos :
267273 name : Test Flet FFI example on macOS (Python ${{ matrix.python_version }})
268274 runs-on : macos-26
275+ # Temporarily gated off while we debug the Windows hang — re-enable after.
276+ if : false
269277 strategy :
270278 fail-fast : false
271279 matrix :
@@ -283,15 +291,20 @@ jobs:
283291 path : ' .fvmrc'
284292 cache : true
285293
294+ - name : Shallow-clone flet (dart-bridge)
295+ run : |
296+ git clone --depth 1 --branch "${FLET_GIT_REF}" "${FLET_GIT_URL}" "${{ runner.temp }}/flet-src"
297+
286298 - name : Run tests
287299 working-directory : " src/serious_python/example/flet_ffi_example"
288300 run : |
289- dart run serious_python:main package app/src --platform Darwin --python-version ${{ matrix.python_version }} --requirements "${{ env.FLET_FFI_REQUIREMENT }}"
301+ dart run serious_python:main package app/src --platform Darwin --python-version ${{ matrix.python_version }} --requirements "${{ runner.temp }}/flet-src/sdk/python/packages/flet "
290302 flutter test integration_test --device-id macos --dart-define=EXPECTED_PYTHON_VERSION=${{ matrix.python_version }}
291303
292304 flet_ffi_ios :
293305 name : Test Flet FFI example on iOS (Python ${{ matrix.python_version }})
294306 runs-on : macos-26
307+ if : false # see `flet_ffi_macos:` rationale
295308 strategy :
296309 fail-fast : false
297310 matrix :
@@ -321,15 +334,20 @@ jobs:
321334 shutdown_after_job : true
322335 wait_for_boot : true
323336
337+ - name : Shallow-clone flet (dart-bridge)
338+ run : |
339+ git clone --depth 1 --branch "${FLET_GIT_REF}" "${FLET_GIT_URL}" "${{ runner.temp }}/flet-src"
340+
324341 - name : Run tests
325342 working-directory : " src/serious_python/example/flet_ffi_example"
326343 run : |
327- dart run serious_python:main package app/src --platform iOS --python-version ${{ matrix.python_version }} --requirements "${{ env.FLET_FFI_REQUIREMENT }}"
344+ dart run serious_python:main package app/src --platform iOS --python-version ${{ matrix.python_version }} --requirements "${{ runner.temp }}/flet-src/sdk/python/packages/flet "
328345 flutter test integration_test --device-id ${{ steps.simulator.outputs.udid }} --dart-define=EXPECTED_PYTHON_VERSION=${{ matrix.python_version }}
329346
330347 flet_ffi_android :
331348 name : Test Flet FFI example on Android (Python ${{ matrix.python_version }})
332349 runs-on : ubuntu-latest
350+ if : false # see `flet_ffi_macos:` rationale
333351 strategy :
334352 fail-fast : false
335353 matrix :
@@ -365,6 +383,10 @@ jobs:
365383 ~/.android/adb*
366384 key : avd-ffi
367385
386+ - name : Shallow-clone flet (dart-bridge)
387+ run : |
388+ git clone --depth 1 --branch "${FLET_GIT_REF}" "${FLET_GIT_URL}" "${{ runner.temp }}/flet-src"
389+
368390 - name : Setup Android Emulator + Run tests
369391 uses : reactivecircus/android-emulator-runner@v2
370392 env :
@@ -384,7 +406,7 @@ jobs:
384406 pre-emulator-launch-script : |
385407 sdkmanager --list_installed
386408 script : |
387- cd src/serious_python/example/flet_ffi_example && dart run serious_python:main package app/src --platform Android --python-version ${{ matrix.python_version }} --requirements "${{ env.FLET_FFI_REQUIREMENT }}"
409+ cd src/serious_python/example/flet_ffi_example && dart run serious_python:main package app/src --platform Android --python-version ${{ matrix.python_version }} --requirements "${{ runner.temp }}/flet-src/sdk/python/packages/flet "
388410 cd src/serious_python/example/flet_ffi_example && flutter test integration_test --device-id emulator-${{ env.EMULATOR_PORT }} --dart-define=EXPECTED_PYTHON_VERSION=${{ matrix.python_version }}
389411
390412 flet_ffi_windows :
@@ -407,15 +429,22 @@ jobs:
407429 path : ' .fvmrc'
408430 cache : true
409431
432+ - name : Shallow-clone flet (dart-bridge)
433+ shell : bash
434+ run : |
435+ git clone --depth 1 --branch "${FLET_GIT_REF}" "${FLET_GIT_URL}" "${RUNNER_TEMP}/flet-src"
436+
410437 - name : Run tests
411438 working-directory : " src/serious_python/example/flet_ffi_example"
439+ shell : bash
412440 run : |
413- dart run serious_python:main package app/src --platform Windows --python-version ${{ matrix.python_version }} --requirements "${{ env.FLET_FFI_REQUIREMENT }} "
441+ dart run serious_python:main package app/src --platform Windows --python-version ${{ matrix.python_version }} --requirements "${RUNNER_TEMP}/flet-src/sdk/python/packages/flet "
414442 flutter test integration_test -d windows --dart-define=EXPECTED_PYTHON_VERSION=${{ matrix.python_version }}
415443
416444 flet_ffi_linux :
417445 name : Test Flet FFI example on Linux ${{ matrix.title }} (Python ${{ matrix.python_version }})
418446 runs-on : ${{ matrix.runner }}
447+ if : false # see `flet_ffi_macos:` rationale
419448 strategy :
420449 fail-fast : false
421450 matrix :
@@ -482,11 +511,15 @@ jobs:
482511 gstreamer1.0-libav
483512 fi
484513
514+ - name : Shallow-clone flet (dart-bridge)
515+ run : |
516+ git clone --depth 1 --branch "${FLET_GIT_REF}" "${FLET_GIT_URL}" "${{ runner.temp }}/flet-src"
517+
485518 - name : Run tests
486519 working-directory : src/serious_python/example/flet_ffi_example
487520 run : |
488521 flutter pub get
489- dart run serious_python:main package app/src --platform Linux --python-version ${{ matrix.python_version }} --requirements "${{ env.FLET_FFI_REQUIREMENT }}"
522+ dart run serious_python:main package app/src --platform Linux --python-version ${{ matrix.python_version }} --requirements "${{ runner.temp }}/flet-src/sdk/python/packages/flet "
490523 xvfb-run flutter test integration_test -d linux --dart-define=EXPECTED_PYTHON_VERSION=${{ matrix.python_version }}
491524
492525 bridge_example_macos :
0 commit comments