Skip to content

Commit 4329b6b

Browse files
FeodorFitsnerclaude
andcommitted
Bump 3.13.14 / 3.14.6 / Pyodide 314.0.0; migrate to date-based python-build scheme
`flet-dev/python-build` 20260611 switched from per-minor v-tags (`v3.14` + `python-*-3.14-*.tar.gz`) to date-keyed tags carrying the full patch version (`20260611` + `python-*-3.14.6-*.tar.gz`); one date release now ships every supported minor. Astral PBS advanced to 20260610 (now ships 3.13.14 / 3.14.6); Pyodide 314.0.0 GA'd. Registry (`_pythonReleases` in package_command.dart) updates: * 3.12 row: PBS date 20260610 (CPython 3.12.13 unchanged). * 3.13 row: CPython 3.13.14, PBS date 20260610. * 3.14 row: CPython 3.14.6, PBS date 20260610, Pyodide 314.0.0. * All three rows gain `pythonBuildReleaseDate: "20260611"`. The 3.13 wheel platform tag was also wrong — `pyodide-2025.0-wasm32` where it should have been `pyemscripten-2025.0-wasm32` (the prefix transition happened at Pyodide 0.28/0.29, not at 314.0). Anyone attempting `flet build web --python-version 3.13` against a Pyodide-built native wheel would have failed to match anything. Fixed in the registry. Plugin build scripts (android/build.gradle, darwin/prepare_{ios,macos}.sh, linux + windows CMakeLists.txt) now read two new env vars exported by `flet build`: * SERIOUS_PYTHON_FULL_VERSION (e.g. 3.14.6) — used in the URL filename * SERIOUS_PYTHON_BUILD_DATE (e.g. 20260611) — used as the URL tag Each plugin keeps a baked-in default so standalone (non-`flet build`) consumers keep working without setting the new vars. The per-plugin cache directory key (`$FLET_CACHE_DIR/python-build/v<…>/`) switches from short to full version so a patch bump doesn't reuse a stale tarball. README + 5 changelog entries updated. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent cf66671 commit 4329b6b

13 files changed

Lines changed: 90 additions & 31 deletions

File tree

src/serious_python/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
* **Breaking change:** Android `sysconfig.get_platform()` tag format changed from `android-24-arm64-v8a` to `android-24-arm64_v8a` (and similarly for `armeabi-v7a`). The emitted wheel tag (`android_24_arm64_v8a`) is unchanged, but anything reading the raw `sysconfig.get_platform()` string from `sitecustomize.py` should switch separators.
55
* **Breaking change:** Windows host arch identifier dropped the `-shared` suffix (`x86_64-pc-windows-msvc-shared``x86_64-pc-windows-msvc`); follows astral-sh/python-build-standalone, which only publishes the combined (already shared) `install_only_stripped` build.
66
* Multi-version Python support. The `package` command accepts `--python-version` (or `SERIOUS_PYTHON_VERSION` env var) to select between Python 3.12 / 3.13 / 3.14. The matching CPython-standalone build, Pyodide release, and Emscripten wheel platform tag are looked up from a new `_pythonReleases` table. Adding a future pre-release line (e.g. 3.15 beta) is a one-row append with `prerelease: true`; the Flet CLI uses that flag to keep open-ended `requires-python` specifiers (`>=3.14`) on stable, while still letting `--python-version 3.15` or `==3.15.*` opt in.
7-
* The Emscripten pip platform tag is now derived per Python release (e.g. `pyodide-2024.0-wasm32` for 0.27.7, `pyemscripten-2026.0-wasm32` for 314.0.0a2), via a `pyodide_platform_tag` field in the version registry. The previous static `pyodide-2024.0-wasm32` entry in `platforms["Emscripten"]` has been removed.
7+
* The Emscripten pip platform tag is now derived per Python release (e.g. `pyodide-2024.0-wasm32` for 0.27.7, `pyemscripten-2026.0-wasm32` for 314.0.0), via a `pyodide_platform_tag` field in the version registry. The previous static `pyodide-2024.0-wasm32` entry in `platforms["Emscripten"]` has been removed.
88
* `sitecustomize.py` now shims `platform.android_ver` so the new pip / packaging that ships with python-build-standalone 20260602+ can compute Android wheel tags on Python 3.12 hosts (where `android_ver` didn't exist) and on Python 3.13+ hosts (where it returns `api_level=0` off-device).
99
* Skip 32-bit Android ABIs (`armeabi-v7a`, `x86`) when Python ≥ 3.13 — PEP 738 dropped 32-bit Android support, and `flet-dev/python-build` no longer publishes those runtimes for those versions.
10+
* Migrate the platform-plugin download URLs to `flet-dev/python-build`'s new date-keyed release scheme (`…/<YYYYMMDD>/python-*-<full-version>-*.tar.gz`) — one release tag now ships every supported Python patch instead of per-minor `v3.X` releases. Plugins (Android `build.gradle`, Darwin `prepare_*.sh`, Linux/Windows `CMakeLists.txt`) read two new env vars set by `flet build`: `SERIOUS_PYTHON_FULL_VERSION` (e.g. `3.14.6`) and `SERIOUS_PYTHON_BUILD_DATE` (e.g. `20260611`); both fall back to baked-in defaults so standalone (non-`flet build`) usage continues to work. Bump bundled versions to **3.12.13 / 3.13.14 / 3.14.6** (Astral PBS `20260610`, python-build `20260611`) and Pyodide for 3.14 to **314.0.0** (GA).
11+
* **Bug fix:** the Pyodide 0.29 wheel platform tag for the 3.13 row in the version registry was `pyodide-2025.0-wasm32`, but Pyodide actually publishes its wheels under `pyemscripten_2025_0_wasm32` (the `pyodide_``pyemscripten_` prefix transition happened at 0.28/0.29, not at 314.0). `flet build web --python-version 3.13` would have failed to match any Pyodide-built native wheel; corrected to `pyemscripten-2025.0-wasm32` in the registry.
1012

1113
## 1.0.1
1214

src/serious_python/README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,25 @@ the `--python-version X.Y` flag of `serious_python:main package` (or the
2222
plugin build scripts). Defaults to the latest supported version when nothing
2323
is specified.
2424

25-
| Short | CPython runtime | Pyodide (web) | Pyodide wheel platform tag |
26-
| ----- | --------------- | ------------- | -------------------------- |
27-
| 3.12 | 3.12.13 | 0.27.7 | `pyodide-2024.0-wasm32` |
28-
| 3.13 | 3.13.13 | 0.29.4 | `pyodide-2025.0-wasm32` |
29-
| 3.14 | 3.14.5 | 314.0.0a2 | `pyemscripten-2026.0-wasm32`|
25+
| Short | CPython runtime | Pyodide (web) | Pyodide wheel platform tag |
26+
| ----- | --------------- | ------------- | -------------------------------- |
27+
| 3.12 | 3.12.13 | 0.27.7 | `pyodide-2024.0-wasm32` |
28+
| 3.13 | 3.13.14 | 0.29.4 | `pyemscripten-2025.0-wasm32` |
29+
| 3.14 | 3.14.6 | 314.0.0 | `pyemscripten-2026.0-wasm32` |
3030

3131
The default is the latest stable row (currently **3.14**) when neither
3232
`--python-version` nor `SERIOUS_PYTHON_VERSION` is set. When running through
3333
[`flet build`](https://flet.dev/docs/publish/), the same resolution is
3434
applied to `[project].requires-python` in your `pyproject.toml`, so most
3535
users never need to touch this flag directly.
3636

37+
`SERIOUS_PYTHON_VERSION` (short, e.g. `3.14`) is the only input most users
38+
need to set. When `flet build` invokes the platform plugins it also exports
39+
`SERIOUS_PYTHON_FULL_VERSION` (e.g. `3.14.6`) and `SERIOUS_PYTHON_BUILD_DATE`
40+
(e.g. `20260611` — the `flet-dev/python-build` release tag); the plugin build
41+
scripts pick them up automatically and combine them into the
42+
`…/<date>/python-*-<full>-*` download URLs.
43+
3744
Source of truth: the `_pythonReleases` map in
3845
[`bin/package_command.dart`](bin/package_command.dart) (Dart side) and
3946
`flet_cli/utils/python_versions.py` (Python side). Adding a new short version

src/serious_python/bin/package_command.dart

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ const allowSourceDistrosEnvironmentVariable =
2525
"SERIOUS_PYTHON_ALLOW_SOURCE_DISTRIBUTIONS";
2626

2727
const pythonVersionEnvironmentVariable = "SERIOUS_PYTHON_VERSION";
28+
const pythonFullVersionEnvironmentVariable = "SERIOUS_PYTHON_FULL_VERSION";
2829
const pythonDistReleaseEnvironmentVariable = "SERIOUS_PYTHON_DIST_RELEASE";
30+
const pythonBuildDateEnvironmentVariable = "SERIOUS_PYTHON_BUILD_DATE";
2931
const pyodideVersionEnvironmentVariable = "SERIOUS_PYTHON_PYODIDE_VERSION";
3032

3133
const defaultPythonVersion = "3.14";
@@ -34,13 +36,20 @@ class _PythonRelease {
3436
const _PythonRelease({
3537
required this.standaloneVersion,
3638
required this.standaloneReleaseDate,
39+
required this.pythonBuildReleaseDate,
3740
required this.pyodideVersion,
3841
required this.pyodidePlatformTag,
3942
required this.prerelease,
4043
});
4144

4245
final String standaloneVersion;
4346
final String standaloneReleaseDate;
47+
48+
// Release date tag of the matching `flet-dev/python-build` release
49+
// (e.g. "20260611"). Combined with `standaloneVersion` to construct the
50+
// platform-plugin download URLs.
51+
final String pythonBuildReleaseDate;
52+
4453
final String pyodideVersion;
4554
final String pyodidePlatformTag;
4655

@@ -55,22 +64,25 @@ class _PythonRelease {
5564
const _pythonReleases = <String, _PythonRelease>{
5665
"3.12": _PythonRelease(
5766
standaloneVersion: "3.12.13",
58-
standaloneReleaseDate: "20260602",
67+
standaloneReleaseDate: "20260610",
68+
pythonBuildReleaseDate: "20260611",
5969
pyodideVersion: "0.27.7",
6070
pyodidePlatformTag: "pyodide-2024.0-wasm32",
6171
prerelease: false,
6272
),
6373
"3.13": _PythonRelease(
64-
standaloneVersion: "3.13.13",
65-
standaloneReleaseDate: "20260602",
74+
standaloneVersion: "3.13.14",
75+
standaloneReleaseDate: "20260610",
76+
pythonBuildReleaseDate: "20260611",
6677
pyodideVersion: "0.29.4",
67-
pyodidePlatformTag: "pyodide-2025.0-wasm32",
78+
pyodidePlatformTag: "pyemscripten-2025.0-wasm32",
6879
prerelease: false,
6980
),
7081
"3.14": _PythonRelease(
71-
standaloneVersion: "3.14.5",
72-
standaloneReleaseDate: "20260602",
73-
pyodideVersion: "314.0.0a2",
82+
standaloneVersion: "3.14.6",
83+
standaloneReleaseDate: "20260610",
84+
pythonBuildReleaseDate: "20260611",
85+
pyodideVersion: "314.0.0",
7486
pyodidePlatformTag: "pyemscripten-2026.0-wasm32",
7587
prerelease: false,
7688
),
@@ -82,6 +94,7 @@ const _pythonReleases = <String, _PythonRelease>{
8294
// "3.15": _PythonRelease(
8395
// standaloneVersion: "3.15.0",
8496
// standaloneReleaseDate: "...",
97+
// pythonBuildReleaseDate: "...",
8598
// pyodideVersion: "...",
8699
// pyodidePlatformTag: "...",
87100
// prerelease: true,
@@ -274,10 +287,15 @@ class PackageCommand extends Command {
274287
exit(2);
275288
}
276289
_release = _PythonRelease(
277-
standaloneVersion: baseRelease.standaloneVersion,
290+
standaloneVersion:
291+
Platform.environment[pythonFullVersionEnvironmentVariable] ??
292+
baseRelease.standaloneVersion,
278293
standaloneReleaseDate:
279294
Platform.environment[pythonDistReleaseEnvironmentVariable] ??
280295
baseRelease.standaloneReleaseDate,
296+
pythonBuildReleaseDate:
297+
Platform.environment[pythonBuildDateEnvironmentVariable] ??
298+
baseRelease.pythonBuildReleaseDate,
281299
pyodideVersion:
282300
Platform.environment[pyodideVersionEnvironmentVariable] ??
283301
baseRelease.pyodideVersion,

src/serious_python_android/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
* Multi-version Python support. `python_version` in `android/build.gradle` reads from `SERIOUS_PYTHON_VERSION` and drives the `flet-dev/python-build` download URL.
55
* The Dart runtime no longer hardcodes `libpython3.12.so` — it scans `nativeLibraryDir` for `libpython3.*.so` so whichever libpython the plugin bundled is loaded automatically.
66
* `abiFilters` now branches on `python_version`: keep `armeabi-v7a` for 3.12, restrict to `arm64-v8a` + `x86_64` for 3.13+ (python-build dropped 32-bit Android per PEP 738).
7+
* Migrate `downloadDistArchive_*` to `flet-dev/python-build`'s new date-keyed release scheme (`…/<YYYYMMDD>/python-android-dart-<full-version>-<abi>.tar.gz` instead of `…/v<short>/python-android-dart-<short>-<abi>.tar.gz`). Two new env vars — `SERIOUS_PYTHON_FULL_VERSION` (e.g. `3.14.6`) and `SERIOUS_PYTHON_BUILD_DATE` (e.g. `20260611`) — are read alongside `SERIOUS_PYTHON_VERSION`, both with baked-in defaults so standalone (non-`flet build`) usage continues to work. The cache directory key (`$FLET_CACHE_DIR/python-build/v<…>/`) switches from short to full version so patch bumps don't reuse a stale tarball.
78

89
## 1.0.1
910

src/serious_python_android/android/build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ group 'com.flet.serious_python_android'
22
version '2.0.0'
33

44
def python_version = System.getenv('SERIOUS_PYTHON_VERSION') ?: '3.14'
5+
def python_full_version = System.getenv('SERIOUS_PYTHON_FULL_VERSION') ?: '3.14.6'
6+
def python_build_date = System.getenv('SERIOUS_PYTHON_BUILD_DATE') ?: '20260611'
57
def dart_bridge_version = System.getenv('DART_BRIDGE_VERSION') ?: '1.2.1'
68

79
buildscript {
@@ -70,7 +72,7 @@ import de.undercouch.gradle.tasks.download.Download
7072
def fletCacheRoot = System.getenv('FLET_CACHE_DIR')
7173
def pythonCacheDir = new File(
7274
fletCacheRoot ? new File(fletCacheRoot) : new File(System.getProperty('user.home'), '.flet/cache'),
73-
"python-build/v${python_version}"
75+
"python-build/v${python_full_version}"
7476
)
7577
def dartBridgeCacheDir = new File(
7678
fletCacheRoot ? new File(fletCacheRoot) : new File(System.getProperty('user.home'), '.flet/cache'),
@@ -102,8 +104,8 @@ android.defaultConfig.ndk.abiFilters.each { abi ->
102104
}
103105

104106
tasks.register("downloadDistArchive_$abi", Download) {
105-
src "https://github.com/flet-dev/python-build/releases/download/v${python_version}/python-android-dart-${python_version}-${abi}.tar.gz"
106-
dest new File(pythonCacheDir, "python-android-dart-${python_version}-${abi}.tar.gz")
107+
src "https://github.com/flet-dev/python-build/releases/download/${python_build_date}/python-android-dart-${python_full_version}-${abi}.tar.gz"
108+
dest new File(pythonCacheDir, "python-android-dart-${python_full_version}-${abi}.tar.gz")
107109
onlyIfModified true
108110
useETag "all"
109111
tempAndMove true

src/serious_python_darwin/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
* **Breaking change:** default bundled Python version is now 3.14 (was 3.12). Apps built without an explicit `SERIOUS_PYTHON_VERSION` env var pull `python-ios-dart-3.14.tar.gz` / `python-macos-dart-3.14.tar.gz` from `flet-dev/python-build`. Set `SERIOUS_PYTHON_VERSION=3.12` to preserve the previous default.
44
* Multi-version Python support. `python_version` in `serious_python_darwin.podspec` reads from `SERIOUS_PYTHON_VERSION`; `prepare_ios.sh` / `prepare_macos.sh` already took the version as `$1` and download the matching tarballs.
5+
* Migrate `prepare_ios.sh` / `prepare_macos.sh` to `flet-dev/python-build`'s new date-keyed release scheme (`…/<YYYYMMDD>/python-{ios,macos}-dart-<full-version>.tar.gz`). The podspec now reads `SERIOUS_PYTHON_FULL_VERSION` and `SERIOUS_PYTHON_BUILD_DATE` (defaults baked in) and passes them as positional args `$2` / `$3` to the prepare scripts.
56

67
## 1.0.1
78

src/serious_python_darwin/darwin/prepare_ios.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
python_version=${1:?}
2+
python_full_version=${2:?}
3+
python_build_date=${3:?}
24

35
script_dir=$(cd "$(dirname "$0")" && pwd -P)
46
dist=$script_dir/dist_ios
@@ -9,15 +11,15 @@ dart_bridge_version=${DART_BRIDGE_VERSION:-1.2.1}
911

1012
# Cross-plugin download cache; see prepare_macos.sh for the convention.
1113
cache_root="${FLET_CACHE_DIR:-$HOME/.flet/cache}"
12-
pb_cache="$cache_root/python-build/v$python_version"
14+
pb_cache="$cache_root/python-build/v$python_full_version"
1315
db_cache="$cache_root/dart-bridge/v$dart_bridge_version"
1416
mkdir -p "$pb_cache" "$db_cache"
1517

1618
# ---- flet-dev/python-build (iOS embedded Python runtime) ------------------
17-
python_ios_dist_file="python-ios-dart-$python_version.tar.gz"
19+
python_ios_dist_file="python-ios-dart-$python_full_version.tar.gz"
1820
python_ios_dist_path="$pb_cache/$python_ios_dist_file"
1921
if [ ! -f "$python_ios_dist_path" ]; then
20-
python_ios_dist_url="https://github.com/flet-dev/python-build/releases/download/v$python_version/$python_ios_dist_file"
22+
python_ios_dist_url="https://github.com/flet-dev/python-build/releases/download/$python_build_date/$python_ios_dist_file"
2123
curl -fL -o "$python_ios_dist_path.tmp" "$python_ios_dist_url"
2224
mv "$python_ios_dist_path.tmp" "$python_ios_dist_path"
2325
fi

src/serious_python_darwin/darwin/prepare_macos.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
python_version=${1:?}
2+
python_full_version=${2:?}
3+
python_build_date=${3:?}
24

35
script_dir=$(cd "$(dirname "$0")" && pwd -P)
46
dist=$script_dir/dist_macos
@@ -11,15 +13,15 @@ dart_bridge_version=${DART_BRIDGE_VERSION:-1.2.1}
1113
# gradle task + flet build's external tooling already use; ~/.flet/cache is
1214
# the shared default. Tarballs land here and survive `flutter clean`.
1315
cache_root="${FLET_CACHE_DIR:-$HOME/.flet/cache}"
14-
pb_cache="$cache_root/python-build/v$python_version"
16+
pb_cache="$cache_root/python-build/v$python_full_version"
1517
db_cache="$cache_root/dart-bridge/v$dart_bridge_version"
1618
mkdir -p "$pb_cache" "$db_cache"
1719

1820
# ---- flet-dev/python-build (macOS embedded Python runtime) ----------------
19-
python_macos_dist_file="python-macos-dart-$python_version.tar.gz"
21+
python_macos_dist_file="python-macos-dart-$python_full_version.tar.gz"
2022
python_macos_dist_path="$pb_cache/$python_macos_dist_file"
2123
if [ ! -f "$python_macos_dist_path" ]; then
22-
python_macos_dist_url="https://github.com/flet-dev/python-build/releases/download/v$python_version/$python_macos_dist_file"
24+
python_macos_dist_url="https://github.com/flet-dev/python-build/releases/download/$python_build_date/$python_macos_dist_file"
2325
# .tmp + mv so a Ctrl-C / network blip doesn't poison the cache.
2426
curl -fL -o "$python_macos_dist_path.tmp" "$python_macos_dist_url"
2527
mv "$python_macos_dist_path.tmp" "$python_macos_dist_path"

src/serious_python_darwin/darwin/serious_python_darwin.podspec

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,16 @@ Pod::Spec.new do |s|
3333
s.swift_version = '5.0'
3434

3535
python_version = ENV['SERIOUS_PYTHON_VERSION'] || "3.14"
36+
python_full_version = ENV['SERIOUS_PYTHON_FULL_VERSION'] || "3.14.6"
37+
python_build_date = ENV['SERIOUS_PYTHON_BUILD_DATE'] || "20260611"
3638

3739
dist_ios = "dist_ios"
3840
dist_macos = "dist_macos"
3941

4042
prepare_command = <<-CMD
4143
./symlink_pod.sh
42-
./prepare_ios.sh #{python_version}
43-
./prepare_macos.sh #{python_version}
44+
./prepare_ios.sh #{python_version} #{python_full_version} #{python_build_date}
45+
./prepare_macos.sh #{python_version} #{python_full_version} #{python_build_date}
4446
./sync_site_packages.sh
4547
CMD
4648

src/serious_python_linux/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
* **Breaking change:** default bundled Python version is now 3.14 (was 3.12). The plugin downloads `python-linux-dart-3.14-<arch>.tar.gz` from `flet-dev/python-build` and bundles `libpython3.14.so.1.0` unless `SERIOUS_PYTHON_VERSION=3.12` is set in the build environment.
44
* Multi-version Python support. `PYTHON_VERSION` in `linux/CMakeLists.txt` reads from `SERIOUS_PYTHON_VERSION`, and all `python3.12` / `libpython3.12.so.1.0` / `lib/python3.12` paths are derived from it. The plugin source receives the version via a `SERIOUS_PYTHON_VERSION` compile-time macro so the runtime module path matches the bundled distro.
5+
* Migrate the `python-linux-dart` download URL to `flet-dev/python-build`'s new date-keyed release scheme (`…/<YYYYMMDD>/python-linux-dart-<full-version>-<arch>.tar.gz`). `CMakeLists.txt` now reads `SERIOUS_PYTHON_FULL_VERSION` and `SERIOUS_PYTHON_BUILD_DATE` from the environment (with baked-in defaults) and the cache directory key uses the full version so patch bumps don't reuse a stale tarball.
56

67
## 1.0.1
78

0 commit comments

Comments
 (0)