Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/serious_python/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* Cache downloaded Python distributions and `dart_bridge` artifacts under `$FLET_CACHE_DIR` (default `~/.flet/cache`) across all platforms.
* Remove the scaffold `getPlatformVersion` method from the platform plugins.
* Drop the `x86` (32-bit Intel) Android ABI — Flutter no longer produces it. Android builds target `arm64-v8a` + `x86_64` (plus `armeabi-v7a` on Python 3.12); the `x86` wheel platform-tag entry and the Android packaging rules referencing it are removed.
* Android ABI list now reads from python-build's manifest (per-minor `android_abis`, surfaced as `<short>.android_abis` in `python_versions.properties` and `PythonRelease.androidAbis` in the generated Dart) instead of the hardcoded `if pythonVersion == "3.12"` branch in `serious_python_android/android/build.gradle.kts`. Drives both `defaultConfig.ndk.abiFilters` and the per-ABI download/copy fan-out; adding a future minor only needs the one-line manifest edit.
* **Breaking change:** the `configure` command (and the bare in-place version-switching machinery, including `stageDarwinRuntime`) is removed. Switching the bundled Python version between builds is now handled by a clean rebuild — `flet build` wipes its build dir on a version change, and the Darwin `dist_ios` / `dist_macos` version marker re-extracts the runtime — so a separate `serious_python configure` step is no longer needed.
* **Bug fix:** the Pyodide 0.29 wheel platform tag for the 3.13 row was `pyodide-2025.0-wasm32`, but Pyodide publishes 0.29 wheels under `pyemscripten_2025_0_wasm32`; corrected to `pyemscripten-2025.0-wasm32` so `flet build web --python-version 3.13` matches native wheels.

Expand Down
12 changes: 12 additions & 0 deletions src/serious_python/bin/gen_version_tables.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,25 +128,35 @@ String _dartFile(String release, String defaultPython, String dartBridge,
..writeln(' required this.standaloneReleaseDate,')
..writeln(' required this.pyodideVersion,')
..writeln(' required this.pyodidePlatformTag,')
..writeln(' required this.androidAbis,')
..writeln(' required this.prerelease,')
..writeln(' });')
..writeln()
..writeln(' final String standaloneVersion;')
..writeln(' final String standaloneReleaseDate;')
..writeln(' final String pyodideVersion;')
..writeln(' final String pyodidePlatformTag;')
..writeln('')
..writeln(' /// Android ABIs python-build publishes distributions for')
..writeln(' /// this minor. 32-bit Android was dropped in 3.13 (PEP 738);')
..writeln(' /// only 3.12 still carries `armeabi-v7a`.')
..writeln(' final List<String> androidAbis;')
..writeln('')
..writeln(' final bool prerelease;')
..writeln('}')
..writeln()
..writeln('const pythonReleases = <String, PythonRelease>{');
for (final s in shorts) {
final r = pythons[s] as Map<String, dynamic>;
final abis = (r['android_abis'] as List).cast<String>();
final abisLiteral = abis.map((a) => '"$a"').join(', ');
b
..writeln(' "$s": PythonRelease(')
..writeln(' standaloneVersion: "${r['full_version']}",')
..writeln(' standaloneReleaseDate: "${r['standalone_release_date']}",')
..writeln(' pyodideVersion: "${r['pyodide_version']}",')
..writeln(' pyodidePlatformTag: "${r['pyodide_platform_tag']}",')
..writeln(' androidAbis: [$abisLiteral],')
..writeln(' prerelease: ${r['prerelease'] == true},')
..writeln(' ),');
}
Expand All @@ -165,6 +175,8 @@ String _propertiesFile(String release, String defaultPython, String dartBridge,
for (final s in shorts) {
final r = pythons[s] as Map<String, dynamic>;
b.writeln('$s.full_version=${r['full_version']}');
final abis = (r['android_abis'] as List).cast<String>();
b.writeln('$s.android_abis=${abis.join(",")}');
}
return b.toString();
}
1 change: 1 addition & 0 deletions src/serious_python/bin/package_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ class PackageCommand extends Command {
Platform.environment[pyodideVersionEnvironmentVariable] ??
baseRelease.pyodideVersion,
pyodidePlatformTag: baseRelease.pyodidePlatformTag,
androidAbis: baseRelease.androidAbis,
prerelease: baseRelease.prerelease,
);
final preNote = _release.prerelease ? " — pre-release" : "";
Expand Down
14 changes: 12 additions & 2 deletions src/serious_python/lib/src/python_versions.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// GENERATED by `dart run serious_python:gen_version_tables` from python-build's
// manifest.json (release 20260614). Do not edit by hand — edit python-build's
// manifest.json (release 20260618). Do not edit by hand — edit python-build's
// manifest.json, cut a release, bump `pythonReleaseDate`, and regenerate.

const pythonVersionEnvironmentVariable = "SERIOUS_PYTHON_VERSION";
Expand All @@ -10,7 +10,7 @@ const pyodideVersionEnvironmentVariable = "SERIOUS_PYTHON_PYODIDE_VERSION";
const dartBridgeVersionEnvironmentVariable = "DART_BRIDGE_VERSION";

/// python-build release the bundled runtimes come from (YYYYMMDD).
const pythonReleaseDate = "20260614";
const pythonReleaseDate = "20260618";
const dartBridgeVersion = "1.4.0";
const defaultPythonVersion = "3.14";

Expand All @@ -20,13 +20,20 @@ class PythonRelease {
required this.standaloneReleaseDate,
required this.pyodideVersion,
required this.pyodidePlatformTag,
required this.androidAbis,
required this.prerelease,
});

final String standaloneVersion;
final String standaloneReleaseDate;
final String pyodideVersion;
final String pyodidePlatformTag;

/// Android ABIs python-build publishes distributions for
/// this minor. 32-bit Android was dropped in 3.13 (PEP 738);
/// only 3.12 still carries `armeabi-v7a`.
final List<String> androidAbis;

final bool prerelease;
}

Expand All @@ -36,20 +43,23 @@ const pythonReleases = <String, PythonRelease>{
standaloneReleaseDate: "20260610",
pyodideVersion: "0.27.7",
pyodidePlatformTag: "pyodide-2024.0-wasm32",
androidAbis: ["arm64-v8a", "x86_64", "armeabi-v7a"],
prerelease: false,
),
"3.13": PythonRelease(
standaloneVersion: "3.13.14",
standaloneReleaseDate: "20260610",
pyodideVersion: "0.29.4",
pyodidePlatformTag: "pyemscripten-2025.0-wasm32",
androidAbis: ["arm64-v8a", "x86_64"],
prerelease: false,
),
"3.14": PythonRelease(
standaloneVersion: "3.14.6",
standaloneReleaseDate: "20260610",
pyodideVersion: "314.0.0",
pyodidePlatformTag: "pyemscripten-2026.0-wasm32",
androidAbis: ["arm64-v8a", "x86_64"],
prerelease: false,
),
};
14 changes: 8 additions & 6 deletions src/serious_python_android/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@ if (pythonFullVersion == null) {
throw GradleException("serious_python: unknown SERIOUS_PYTHON_VERSION '$pythonVersion'. Supported: ${known.joinToString(", ")}")
}

// python-build dropped 32-bit Android in 3.13 (PEP 738), so the
// python-android-dart-<ver>-armeabi-v7a tarball only exists for 3.12.
val abis: List<String> = if (pythonVersion == "3.12")
listOf("arm64-v8a", "armeabi-v7a", "x86_64")
else
listOf("arm64-v8a", "x86_64")
// ABIs come from python-build's manifest (the per-minor `android_abis` array,
// flattened into python_versions.properties by `gen_version_tables`). 3.12
// still ships armeabi-v7a; 3.13+ are 64-bit-only (PEP 738). A future minor
// only needs the manifest edit — no Gradle change here.
val abis: List<String> = (pv.getProperty("$pythonVersion.android_abis")
?: throw GradleException(
"serious_python: python_versions.properties has no '$pythonVersion.android_abis'"))
.split(",").map { it.trim() }.filter { it.isNotEmpty() }

configure<LibraryExtension> {
namespace = "com.flet.serious_python_android"
Expand Down
7 changes: 5 additions & 2 deletions src/serious_python_android/android/python_versions.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# GENERATED by `dart run serious_python:gen_version_tables` from
# python-build manifest.json (release 20260614). Do not edit by hand.
# python-build manifest.json (release 20260618). Do not edit by hand.
default_python_version=3.14
dart_bridge_version=1.4.0
python_build_release_date=20260614
python_build_release_date=20260618
3.12.full_version=3.12.13
3.12.android_abis=arm64-v8a,x86_64,armeabi-v7a
3.13.full_version=3.13.14
3.13.android_abis=arm64-v8a,x86_64
3.14.full_version=3.14.6
3.14.android_abis=arm64-v8a,x86_64
7 changes: 5 additions & 2 deletions src/serious_python_darwin/darwin/python_versions.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# GENERATED by `dart run serious_python:gen_version_tables` from
# python-build manifest.json (release 20260614). Do not edit by hand.
# python-build manifest.json (release 20260618). Do not edit by hand.
default_python_version=3.14
dart_bridge_version=1.4.0
python_build_release_date=20260614
python_build_release_date=20260618
3.12.full_version=3.12.13
3.12.android_abis=arm64-v8a,x86_64,armeabi-v7a
3.13.full_version=3.13.14
3.13.android_abis=arm64-v8a,x86_64
3.14.full_version=3.14.6
3.14.android_abis=arm64-v8a,x86_64
7 changes: 5 additions & 2 deletions src/serious_python_linux/linux/python_versions.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# GENERATED by `dart run serious_python:gen_version_tables` from
# python-build manifest.json (release 20260614). Do not edit by hand.
# python-build manifest.json (release 20260618). Do not edit by hand.
default_python_version=3.14
dart_bridge_version=1.4.0
python_build_release_date=20260614
python_build_release_date=20260618
3.12.full_version=3.12.13
3.12.android_abis=arm64-v8a,x86_64,armeabi-v7a
3.13.full_version=3.13.14
3.13.android_abis=arm64-v8a,x86_64
3.14.full_version=3.14.6
3.14.android_abis=arm64-v8a,x86_64
7 changes: 5 additions & 2 deletions src/serious_python_windows/windows/python_versions.properties
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# GENERATED by `dart run serious_python:gen_version_tables` from
# python-build manifest.json (release 20260614). Do not edit by hand.
# python-build manifest.json (release 20260618). Do not edit by hand.
default_python_version=3.14
dart_bridge_version=1.4.0
python_build_release_date=20260614
python_build_release_date=20260618
3.12.full_version=3.12.13
3.12.android_abis=arm64-v8a,x86_64,armeabi-v7a
3.13.full_version=3.13.14
3.13.android_abis=arm64-v8a,x86_64
3.14.full_version=3.14.6
3.14.android_abis=arm64-v8a,x86_64
Loading