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 :
@@ -285,10 +291,14 @@ jobs:
285291 path : ' .fvmrc'
286292 cache : true
287293
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+
288298 - name : Run tests
289299 working-directory : " src/serious_python/example/flet_ffi_example"
290300 run : |
291- 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 "
292302 flutter test integration_test --device-id macos --dart-define=EXPECTED_PYTHON_VERSION=${{ matrix.python_version }}
293303
294304 flet_ffi_ios :
@@ -324,10 +334,14 @@ jobs:
324334 shutdown_after_job : true
325335 wait_for_boot : true
326336
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+
327341 - name : Run tests
328342 working-directory : " src/serious_python/example/flet_ffi_example"
329343 run : |
330- 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 "
331345 flutter test integration_test --device-id ${{ steps.simulator.outputs.udid }} --dart-define=EXPECTED_PYTHON_VERSION=${{ matrix.python_version }}
332346
333347 flet_ffi_android :
@@ -369,6 +383,10 @@ jobs:
369383 ~/.android/adb*
370384 key : avd-ffi
371385
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+
372390 - name : Setup Android Emulator + Run tests
373391 uses : reactivecircus/android-emulator-runner@v2
374392 env :
@@ -388,7 +406,7 @@ jobs:
388406 pre-emulator-launch-script : |
389407 sdkmanager --list_installed
390408 script : |
391- 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 "
392410 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 }}
393411
394412 flet_ffi_windows :
@@ -411,10 +429,16 @@ jobs:
411429 path : ' .fvmrc'
412430 cache : true
413431
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+
414437 - name : Run tests
415438 working-directory : " src/serious_python/example/flet_ffi_example"
439+ shell : bash
416440 run : |
417- 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 "
418442 flutter test integration_test -d windows --dart-define=EXPECTED_PYTHON_VERSION=${{ matrix.python_version }}
419443
420444 flet_ffi_linux :
@@ -487,11 +511,15 @@ jobs:
487511 gstreamer1.0-libav
488512 fi
489513
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+
490518 - name : Run tests
491519 working-directory : src/serious_python/example/flet_ffi_example
492520 run : |
493521 flutter pub get
494- 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 "
495523 xvfb-run flutter test integration_test -d linux --dart-define=EXPECTED_PYTHON_VERSION=${{ matrix.python_version }}
496524
497525 bridge_example_macos :
0 commit comments