Commit 4e77288
Lift app packaging into serious_python + SPM-by-default darwin builds (#6608)
* Update CONTRIBUTING.md hello.py example to use modern `ft.run()` and `ft.Page`/`ft.Text` instead of deprecated `flet.app (#6582)
* Fix issue #6579
* docs: use fvm for Flutter commands
* feat: add flet-spinkit extension package wrapping flutter_spinkit ^5.2.2 (#6596)
* feat(flet-spinkit): add flet-spinkit extension package wrapping flutter_spinkit ^5.2.2
Adds 31 separate spinner animation controls (SpinKitRotatingCircle,
SpinKitWave, SpinKitRipple, etc.) following the same structure as
flet-color-pickers. Includes a spinkit_showcase example.
* fix(flet-spinkit): use local path source for flet-spinkit in example
* fix(flet-spinkit): use ft.Alignment.CENTER instead of ft.alignment.center
* fix(flet-spinkit): use ft.Border.all instead of ft.border.all
* refactor(flet-spinkit): simplify example to a single SpinKitRotatingCircle
* feat(flet-spinkit): register flet_spinkit extension in client runner
* fix(flet-spinkit): remove SpinKitPumpCurve/RingCurve (Curve helpers, not widgets), add SpinKitWaveSpinner
* refactor(flet-spinkit): strip SpinKit prefix from all Python class names
Python API is now fsk.RotatingCircle, fsk.Wave, fsk.WaveType etc.
Flutter control type strings (@ft.control decorator values) are unchanged.
* feat(flet-spinkit): expand example to a full 30-spinner grid showcase
* feat(flet-spinkit): add spinkit_props example; use system theme in both examples
* docs(flet-spinkit): add single-page SpinKit docs and sidebar entry
* docs(flet-spinkit): register flet_spinkit in crocodocs; remove image refs from docs
* ci(flet-spinkit): add flet-spinkit to build and publish pipeline; remove local path source overrides from examples
* test(flet-spinkit): add unit tests; fix stale showcase description
* refactor(flet-spinkit): rename import alias from fsk to spins in examples and tests
* feat(flet-spinkit): complete integration and cleanup
- Register flet-spinkit in sdk/python/pyproject.toml (dependencies + uv.sources)
- Register flet-spinkit in sdk/python/packages/flet/pyproject.toml (extensions group)
- Register flet-spinkit in flet_build_test/pyproject.toml (dependencies, uv.sources, dev_packages)
- Replace custom _parseWaveType() helper with parseEnum() in spinkit.dart
- Update implement-flet-extension SKILL.md with lessons learned from this implementation
* docs(flet-spinkit): split into per-control pages, add WaveType page
Replace single-page spinkit docs with individual pages per control,
consistent with flet-color-pickers and other extensions. Add WaveType
enum page to fix unresolved reST cross-reference on the Wave page.
* test(flet-spinkit): rewrite as proper integration tests using ftt.FletTestApp
Replace pure Python unit tests with integration tests that render each
control in a real Flutter app. Use tester.pump() instead of
pump_and_settle() to advance animation clock without waiting for
continuous animations to settle. Assert finder.count == 1 to verify
each control is mounted in the Flutter widget tree.
* docs(flet-spinkit): reformat README to match other extension packages
* Lift app packaging into serious_python: unpacked bundle + reworked storage dirs
App Python sources now ship unpacked inside the app bundle (next to
stdlib/site-packages) on macOS/iOS/Windows/Linux instead of being extracted
from app.zip on first launch; Android ships a stored app.zip asset unpacked
once. The app dir is read-only, so the process cwd moves to a writable,
app-private data dir.
- build_base.py: stage the app via SERIOUS_PYTHON_APP for native platforms;
gate the app.zip existence check to Emscripten/web.
- templates main.dart / native_runtime.dart: ask serious_python for the app
dir (prepareApp/getAppDir) instead of extracting app.zip; set cwd +
FLET_APP_STORAGE_DATA to <support>/data, add FLET_APP_STORAGE_CACHE, repoint
FLET_APP_STORAGE_TEMP to the OS temp dir; pubspec pins serious_python 4.0.0
and makes app.zip a web-only asset.
- run.py: dev-mode storage under a hidden, self-gitignored <project>/.flet/;
cwd = .flet/storage/data, redirect TMPDIR, set the three FLET_APP_STORAGE_*
vars; hide .flet/ on Windows; write a README explaining the dirs.
- docs: new breaking-change guide + updated environment-variables,
read-and-write-files, storagepaths, sidebars.
* Bump pasteboard to ^0.5.0 (and refresh transitive deps in client lockfile)
* flet build: Swift Package Manager by default for iOS/macOS (#6607)
* flet build: use Swift Package Manager for iOS/macOS by default
Drives the new serious_python_darwin SPM build path. SPM is Flet's default
darwin integration (CocoaPods remains the fallback); Flet auto-enables it only
on its own managed Flutter, never a Flutter found on PATH.
- flutter_base.py: install_flutter() now enables Swift Package Manager on the
Flet-managed Flutter (`flutter config --enable-swift-package-manager`) and sets
flutter_installed_by_flet.
- build_base.py: _darwin_spm_active() reports whether the darwin build uses SPM
(true on Flet's managed Flutter; otherwise honors the user's flutter config via
`flutter config --machine`). When active, the package step gets
SERIOUS_PYTHON_DARWIN_SPM (so serious_python does the host-side SPM staging the
podspec prepare_command can't) + SERIOUS_PYTHON_SPM_KEY_FILE, and the flutter
build env gets SP_NATIVE_SET read back from that key file so SwiftPM re-resolves
when the staged native set changes.
Requires serious_python >= the SPM-capable release.
* flet build: SPM-by-default plumbing + client plugin migration + stale flutter-packages fix
- build_base.py: set SERIOUS_PYTHON_DARWIN_SPM explicitly (true/false) and
pass SP_NATIVE_SET key file through to serious_python's package step;
--swift-package-manager / pyproject opt-out with flet-video auto-fallback.
- build_base.py: register_flutter_extensions now always clears the permanent
flutter-packages dir before staging this build's set, so an extension
removed since the previous build (e.g. dropping flet-video) no longer
lingers in the built app.
- flutter_base.py: drop the global 'flutter config' SPM toggle (flet must not
mutate Flutter's machine-wide config).
- client: migrate off non-SPM plugins for the default desktop client —
window_to_front -> windowManager.show(); pin screen_retriever 0.2.1 (SPM);
regenerate plugin registrants + Runner SPM project wiring.
- typos: exclude generated *.pbxproj (pre-commit hook + _typos.toml).
- templates/build pubspec + CHANGELOG.
* flet build: always stage serious_python for SPM (drop flet-video CocoaPods fallback)
The flet-video auto-fallback assumed that an app with a non-SPM plugin builds
entirely with CocoaPods, so serious_python was staged for CocoaPods. That's
wrong for Flutter 3.44+ (SPM on by default): Flutter builds hybrid — plugins
with a Package.swift (incl. serious_python_darwin) use SPM while non-SPM plugins
(media_kit/flet-video, torch_light) use CocoaPods in the same build. Staging
serious_python for CocoaPods while Flutter linked it via its Package.swift left
dart_bridge unlinked -> 'Undefined symbol: _DartBridge_*/_serious_python_run' on
macOS and iOS.
Always stage for SPM (Flutter's default); other non-SPM plugins ride CocoaPods
via Flutter's hybrid mode independently. Keep --no-swift-package-manager /
swift_package_manager=false only for when SPM is disabled in Flutter itself.
Removes _references_non_spm_plugins/_NON_SPM_PLUGINS/_app_uses_non_spm_plugin
(and the now-unused canonicalize_name/contextlib imports).
* Add example deps and modernize typing imports
Add flet-code-editor and flet-color-pickers to the flet_build_test example (pyproject and example imports) and register flet_spinkit import in main.py. Modernize typing usage across packages: add conditional typing-extensions dependency for flet-webview, use typing.Self on Python >=3.11 with a fallback to typing_extensions.Self, and simplify/remove try/except fallbacks by importing Protocol, TypeVar and ParamSpec directly from typing. These changes simplify type annotations and ensure compatibility with older Python via typing-extensions.
* Pin serious_python to 4.0.0
Commented out the Shizuku Android provider entries in sdk/python/examples/apps/flet_build_test/pyproject.toml to disable that provider by default. Replaced the git-based serious_python dependency in sdk/python/templates/build/{{cookiecutter.out_dir}}/pubspec.yaml with a pinned version (4.0.0) to stop tracking the main branch and use the published package.
---------
Co-authored-by: Federico Rao <157750791+Federicorao@users.noreply.github.com>
Co-authored-by: InesaFitsner <inesa@appveyor.com>1 parent a9e17d7 commit 4e77288
90 files changed
Lines changed: 6861 additions & 176 deletions
File tree
- .agents/skills/implement-flet-extension
- .github/workflows
- client
- lib
- linux/flutter
- macos
- Flutter
- Runner.xcodeproj
- windows/flutter
- packages/flet
- lib/src/utils
- sdk/python
- examples
- apps/flet_build_test
- src
- extensions/spinkit
- spinkit_props
- spinkit_showcase
- packages
- flet-cli/src/flet_cli/commands
- flet-flashlight/src/flutter/flet_flashlight
- flet-spinkit
- src
- flet_spinkit
- flutter/flet_spinkit
- lib
- src
- flet-webview
- src/flet_webview
- flet
- integration_tests/extensions/spinkit
- src/flet
- components/hooks
- controls
- templates
- app/app/{{cookiecutter.out_dir}}
- build/{{cookiecutter.out_dir}}
- lib
- tools/crocodocs
- website
- docs
- controls/spinkit
- cookbook
- reference
- services
- updates/breaking-changes
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
72 | 75 | | |
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
| 79 | + | |
76 | 80 | | |
77 | 81 | | |
78 | 82 | | |
79 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
80 | 87 | | |
81 | 88 | | |
82 | | - | |
83 | | - | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
84 | 95 | | |
85 | 96 | | |
86 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
672 | 672 | | |
673 | 673 | | |
674 | 674 | | |
| 675 | + | |
675 | 676 | | |
676 | 677 | | |
677 | 678 | | |
| |||
836 | 837 | | |
837 | 838 | | |
838 | 839 | | |
| 840 | + | |
839 | 841 | | |
840 | 842 | | |
841 | 843 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
0 commit comments