diff --git a/.claude/skills/prepare-release/SKILL.md b/.claude/skills/prepare-release/SKILL.md new file mode 100644 index 00000000..29f0bdf7 --- /dev/null +++ b/.claude/skills/prepare-release/SKILL.md @@ -0,0 +1,113 @@ +--- +name: prepare-release +description: Use when asked to prepare a new serious_python release — optionally bump the bundled python-build snapshot, bump all package versions, regenerate version tables, and author CHANGELOG entries. Stops before tagging/publishing. +--- + +# Prepare a serious_python release + +`serious_python` ships as six packages under `src/` that are versioned and released +together, all at the **same** version: + +- `serious_python` (the CLI + Dart API; owns `bin/gen_version_tables.dart`) +- `serious_python_platform_interface` +- `serious_python_android`, `serious_python_darwin`, `serious_python_linux`, `serious_python_windows` + +The bundled CPython runtimes come from `flet-dev/python-build`, whose date-keyed +(`YYYYMMDD`) `manifest.json` is the single source of truth for Python/Pyodide/ +`dart_bridge`/ABI versions. The committed version tables are **generated** from it. + +## Inputs to establish first + +- **Target version.** Latest release is `git describe --tags --abbrev=0` (or the newest + `## X.Y.Z` in `src/serious_python/CHANGELOG.md`). Patch bump → increment the third + digit; minor/feature → second; major → first. +- **python-build snapshot.** Is this release also re-pinning python-build to a newer + `YYYYMMDD` release? If yes, get the target date. If no, skip the "Bump python-build + snapshot" section entirely. +- **What changed**, so the CHANGELOG is accurate: the merged PRs since the last release + (`git log ..HEAD`) and, if bumping the snapshot, what changed in python-build + between the old and new release (see below). + +## Tooling + +Use the fvm-pinned Flutter/Dart, not a bare `dart` (see `.fvmrc`): + +``` +fvm dart --version # should match .fvmrc +``` + +If `fvm` isn't on `PATH`, it's at `~/.fvm_flutter/bin/fvm`; the pinned SDK lives under +`~/fvm/versions/`. + +## Bump the python-build snapshot (only if re-pinning) + +The version tables are generated — **do not hand-edit** `python_versions.dart` or the +`python_versions.properties` files. + +1. Inspect what actually changed in the new python-build release, so you can write a + truthful CHANGELOG (versions often don't move — a release may just rebuild one platform): + ``` + gh release view --repo flet-dev/python-build + gh api repos/flet-dev/python-build/compare/... \ + --jq '.commits[] | "- " + (.commit.message | split("\n")[0])' + # and diff the manifests to see which version fields, if any, moved: + # curl -sL .../download//manifest.json vs /manifest.json + ``` +2. Regenerate from the new manifest (run from the `serious_python` package dir): + ``` + cd src/serious_python + fvm dart pub get + fvm dart run serious_python:gen_version_tables --release-date + ``` + This rewrites `lib/src/python_versions.dart` (incl. `pythonReleaseDate`) and the four + `python_versions.properties` files under the native packages. +3. Verify the generator is idempotent (this is exactly the CI "Version tables in sync + with manifest" check — the no-arg form reads the now-pinned date and must produce no + further diff): + ``` + fvm dart run serious_python:gen_version_tables # no args + git diff --stat -- '*python_versions*' # no NEW changes beyond step 2 + ``` + +## Bump all package versions + +Set the target version in every place (they must all match): + +- `version:` in all six `src/*/pubspec.yaml` +- `version = "X.Y.Z"` in `src/serious_python_android/android/build.gradle.kts` +- `s.version = 'X.Y.Z'` in `src/serious_python_darwin/darwin/serious_python_darwin.podspec` + +Inter-package dependencies are `path:`-based (no version constraints to bump). The example +apps' `pubspec.lock` files under `src/serious_python/example/*` pin path deps and can drift; +refresh with `fvm flutter pub get` in each if you want them current, but it's not required +for publishing. + +Sanity check nothing stale remains: +``` +grep -rn "" src/ --include='*.yaml' --include='*.kts' --include='*.podspec' --include='*.dart' +``` + +## Author CHANGELOG entries + +Add a `## X.Y.Z` section at the top of each package's `CHANGELOG.md`. Match the existing +tone/format. Route the content to the package it actually belongs to: + +- Put the substantive, mechanism-level entry in the affected native package (e.g. an + iOS/macOS fix → `serious_python_darwin`), and a user-facing one-line summary that + cross-references it (`See serious_python_darwin X.Y.Z.`) in the top-level `serious_python`. +- Packages with no real change get an alignment line, e.g. + `Version bump aligning with the serious_python_* X.Y.Z release.` +- If you bumped the snapshot but a platform's binaries are byte-identical to the previous + snapshot, say so (`Bump the bundled python-build snapshot to ; + runtimes are byte-identical to .`). +- Only include real, user-relevant items tied to a PR/issue — skip chore/trivial/duplicate + commits. + +## Finish + +- Do **not** run on `main` directly — create a branch (e.g. `bump-X.Y.Z`), commit, and open + a PR (this is how prior bumps landed, e.g. #221). Mirror the prior commit-message style + ("Bump to X.Y.Z: ") unless told otherwise. +- **Do not tag, release, or publish.** CI being green is not a signal to release. Tagging and + publishing to pub.dev happen only on an explicit, in-session request from the user — never + autonomously. diff --git a/src/serious_python/CHANGELOG.md b/src/serious_python/CHANGELOG.md index e3f52326..dfa7f545 100644 --- a/src/serious_python/CHANGELOG.md +++ b/src/serious_python/CHANGELOG.md @@ -1,3 +1,8 @@ +## 4.2.1 + +* **iOS/macOS:** ctypes packages that ship plain `.dylib` shared libraries (e.g. `llama-cpp-python`'s `libllama` / `libggml`) now load on the **iOS simulator**. Such `.dylib`s are now packaged as per-slice xcframeworks (previously only `.so` C-extensions were), so they carry a simulator slice instead of shipping the device build and failing `dlopen` with `incompatible platform (have 'iOS', need 'iOS-simulator')`; their install-name is preserved so multi-lib packages still resolve their sibling libs. See `serious_python_darwin` 4.2.1. +* **iOS:** the `_multiprocessing` extension is now built into the runtime (importable, not spawnable) via `flet-dev/python-build` `20260701`. Bundled Python versions are unchanged from 4.2.0 (**3.12.13 / 3.13.14 / 3.14.6**). + ## 4.2.0 * **Android:** `armeabi-v7a` (32-bit ARM) is now bundled for Python **3.13** and **3.14**, not just 3.12 — `flet-dev/python-build` `20260630` publishes 32-bit ARM runtimes for those minors (built with `dart_bridge` **1.4.1**). The `package` command's hardcoded "3.12-only" `armeabi-v7a` skip is replaced by a manifest-driven check against each minor's `PythonRelease.androidAbis`, so the wheel fan-out (and the Android plugin's `abiFilters`) follow whatever python-build publishes per minor. diff --git a/src/serious_python/lib/src/python_versions.dart b/src/serious_python/lib/src/python_versions.dart index 4972e145..d654a80b 100644 --- a/src/serious_python/lib/src/python_versions.dart +++ b/src/serious_python/lib/src/python_versions.dart @@ -1,5 +1,5 @@ // GENERATED by `dart run serious_python:gen_version_tables` from python-build's -// manifest.json (release 20260630). Do not edit by hand — edit python-build's +// manifest.json (release 20260701). Do not edit by hand — edit python-build's // manifest.json, cut a release, bump `pythonReleaseDate`, and regenerate. const pythonVersionEnvironmentVariable = "SERIOUS_PYTHON_VERSION"; @@ -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 = "20260630"; +const pythonReleaseDate = "20260701"; const dartBridgeVersion = "1.4.1"; const defaultPythonVersion = "3.14"; diff --git a/src/serious_python/pubspec.yaml b/src/serious_python/pubspec.yaml index 2174a216..97d1a686 100644 --- a/src/serious_python/pubspec.yaml +++ b/src/serious_python/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python description: A cross-platform plugin for adding embedded Python runtime to your Flutter apps. homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 4.2.0 +version: 4.2.1 platforms: ios: diff --git a/src/serious_python_android/CHANGELOG.md b/src/serious_python_android/CHANGELOG.md index bcf689db..369c0781 100644 --- a/src/serious_python_android/CHANGELOG.md +++ b/src/serious_python_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.2.1 + +* Bump the bundled python-build snapshot to `20260701`; aligns with the `serious_python_*` 4.2.1 release. The Android runtimes are byte-identical to `20260630` (the release only rebuilds the iOS runtime). + ## 4.2.0 * **`armeabi-v7a` (32-bit ARM) is now bundled for Python 3.13 and 3.14**, not just 3.12. `flet-dev/python-build` `20260630` publishes 32-bit ARM runtimes for those minors (built with `dart_bridge` **1.4.1**), so the per-minor `android_abis` in `python_versions.properties` now include `armeabi-v7a` across the board and `defaultConfig.ndk.abiFilters` + the per-ABI download/copy fan-out pick it up automatically — no Gradle change needed. diff --git a/src/serious_python_android/android/build.gradle.kts b/src/serious_python_android/android/build.gradle.kts index 042f60e0..68d5c8a4 100644 --- a/src/serious_python_android/android/build.gradle.kts +++ b/src/serious_python_android/android/build.gradle.kts @@ -21,7 +21,7 @@ buildscript { } group = "com.flet.serious_python_android" -version = "4.2.0" +version = "4.2.1" rootProject.allprojects { repositories { diff --git a/src/serious_python_android/android/python_versions.properties b/src/serious_python_android/android/python_versions.properties index 5487bb07..faf98a2e 100644 --- a/src/serious_python_android/android/python_versions.properties +++ b/src/serious_python_android/android/python_versions.properties @@ -1,8 +1,8 @@ # GENERATED by `dart run serious_python:gen_version_tables` from -# python-build manifest.json (release 20260630). Do not edit by hand. +# python-build manifest.json (release 20260701). Do not edit by hand. default_python_version=3.14 dart_bridge_version=1.4.1 -python_build_release_date=20260630 +python_build_release_date=20260701 3.12.full_version=3.12.13 3.12.android_abis=arm64-v8a,x86_64,armeabi-v7a 3.13.full_version=3.13.14 diff --git a/src/serious_python_android/pubspec.yaml b/src/serious_python_android/pubspec.yaml index e95825d5..04edf59e 100644 --- a/src/serious_python_android/pubspec.yaml +++ b/src/serious_python_android/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python_android description: Android implementation of the serious_python plugin homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 4.2.0 +version: 4.2.1 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/src/serious_python_darwin/CHANGELOG.md b/src/serious_python_darwin/CHANGELOG.md index 9ca2b8ea..27a509b2 100644 --- a/src/serious_python_darwin/CHANGELOG.md +++ b/src/serious_python_darwin/CHANGELOG.md @@ -1,3 +1,8 @@ +## 4.2.1 + +* Framework-ize ctypes `.dylib` shared libs (not just `.so` C-extensions) when syncing iOS site-packages, so `.dylib`-shipping packages (e.g. `llama-cpp-python`) load on the **iOS simulator** instead of failing `dlopen` with `incompatible platform (have 'iOS', need 'iOS-simulator')`. Each `.dylib` becomes a device+simulator xcframework + `.fwork` pointer, exactly like `.so`; unlike `.so` (whose id is rewritten to the framework path), the `.dylib` install-name is preserved so multi-lib packages resolve their sibling libs. The `.so` path is unchanged. +* Bump the bundled python-build snapshot to `20260701`: the iOS runtime now builds the `_multiprocessing` extension (importable, not spawnable). Python/`dart_bridge` versions are unchanged from `20260630`. + ## 4.2.0 * Bump the bundled python-build snapshot to `20260630` (`dart_bridge` `1.4.1`); aligns with the `serious_python_*` 4.2.0 release. diff --git a/src/serious_python_darwin/darwin/python_versions.properties b/src/serious_python_darwin/darwin/python_versions.properties index 5487bb07..faf98a2e 100644 --- a/src/serious_python_darwin/darwin/python_versions.properties +++ b/src/serious_python_darwin/darwin/python_versions.properties @@ -1,8 +1,8 @@ # GENERATED by `dart run serious_python:gen_version_tables` from -# python-build manifest.json (release 20260630). Do not edit by hand. +# python-build manifest.json (release 20260701). Do not edit by hand. default_python_version=3.14 dart_bridge_version=1.4.1 -python_build_release_date=20260630 +python_build_release_date=20260701 3.12.full_version=3.12.13 3.12.android_abis=arm64-v8a,x86_64,armeabi-v7a 3.13.full_version=3.13.14 diff --git a/src/serious_python_darwin/darwin/serious_python_darwin.podspec b/src/serious_python_darwin/darwin/serious_python_darwin.podspec index 4a11a935..83e93967 100644 --- a/src/serious_python_darwin/darwin/serious_python_darwin.podspec +++ b/src/serious_python_darwin/darwin/serious_python_darwin.podspec @@ -4,7 +4,7 @@ # Pod::Spec.new do |s| s.name = 'serious_python_darwin' - s.version = '4.2.0' + s.version = '4.2.1' s.summary = 'A cross-platform plugin for adding embedded Python runtime to your Flutter apps.' s.description = <<-DESC A cross-platform plugin for adding embedded Python runtime to your Flutter apps. diff --git a/src/serious_python_darwin/pubspec.yaml b/src/serious_python_darwin/pubspec.yaml index f1b72d9b..9ef38137 100644 --- a/src/serious_python_darwin/pubspec.yaml +++ b/src/serious_python_darwin/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python_darwin description: iOS and macOS implementations of the serious_python plugin homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 4.2.0 +version: 4.2.1 environment: # The Swift Package Manager build path needs Flutter 3.44 / Dart 3.11 (the diff --git a/src/serious_python_linux/CHANGELOG.md b/src/serious_python_linux/CHANGELOG.md index 281830e8..9b232ba5 100644 --- a/src/serious_python_linux/CHANGELOG.md +++ b/src/serious_python_linux/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.2.1 + +* Bump the bundled python-build snapshot to `20260701`; aligns with the `serious_python_*` 4.2.1 release. The Linux runtimes are byte-identical to `20260630` (the release only rebuilds the iOS runtime). + ## 4.2.0 * Bump the bundled python-build snapshot to `20260630` (`dart_bridge` `1.4.1`); aligns with the `serious_python_*` 4.2.0 release. diff --git a/src/serious_python_linux/linux/python_versions.properties b/src/serious_python_linux/linux/python_versions.properties index 5487bb07..faf98a2e 100644 --- a/src/serious_python_linux/linux/python_versions.properties +++ b/src/serious_python_linux/linux/python_versions.properties @@ -1,8 +1,8 @@ # GENERATED by `dart run serious_python:gen_version_tables` from -# python-build manifest.json (release 20260630). Do not edit by hand. +# python-build manifest.json (release 20260701). Do not edit by hand. default_python_version=3.14 dart_bridge_version=1.4.1 -python_build_release_date=20260630 +python_build_release_date=20260701 3.12.full_version=3.12.13 3.12.android_abis=arm64-v8a,x86_64,armeabi-v7a 3.13.full_version=3.13.14 diff --git a/src/serious_python_linux/pubspec.yaml b/src/serious_python_linux/pubspec.yaml index 27a6bd32..526b5e34 100644 --- a/src/serious_python_linux/pubspec.yaml +++ b/src/serious_python_linux/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python_linux description: Linux implementations of the serious_python plugin homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 4.2.0 +version: 4.2.1 environment: sdk: '>=3.1.3 <4.0.0' diff --git a/src/serious_python_platform_interface/CHANGELOG.md b/src/serious_python_platform_interface/CHANGELOG.md index bd62fd2e..0374f5fa 100644 --- a/src/serious_python_platform_interface/CHANGELOG.md +++ b/src/serious_python_platform_interface/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.2.1 + +* Version bump aligning with the `serious_python_*` 4.2.1 release. + ## 4.2.0 * Version bump aligning with the `serious_python_*` 4.2.0 release. diff --git a/src/serious_python_platform_interface/pubspec.yaml b/src/serious_python_platform_interface/pubspec.yaml index 81ba7af4..ea303247 100644 --- a/src/serious_python_platform_interface/pubspec.yaml +++ b/src/serious_python_platform_interface/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python_platform_interface description: A common platform interface for the serious_python plugin. homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 4.2.0 +version: 4.2.1 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/src/serious_python_windows/CHANGELOG.md b/src/serious_python_windows/CHANGELOG.md index e823bad5..efb47934 100644 --- a/src/serious_python_windows/CHANGELOG.md +++ b/src/serious_python_windows/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.2.1 + +* Bump the bundled python-build snapshot to `20260701`; aligns with the `serious_python_*` 4.2.1 release. The Windows runtimes are byte-identical to `20260630` (the release only rebuilds the iOS runtime). + ## 4.2.0 * Bump the bundled python-build snapshot to `20260630` (`dart_bridge` `1.4.1`); aligns with the `serious_python_*` 4.2.0 release. diff --git a/src/serious_python_windows/pubspec.yaml b/src/serious_python_windows/pubspec.yaml index 1e9aecaa..03a0bf20 100644 --- a/src/serious_python_windows/pubspec.yaml +++ b/src/serious_python_windows/pubspec.yaml @@ -2,7 +2,7 @@ name: serious_python_windows description: Windows implementations of the serious_python plugin homepage: https://flet.dev repository: https://github.com/flet-dev/serious-python -version: 4.2.0 +version: 4.2.1 environment: sdk: '>=3.1.3 <4.0.0' diff --git a/src/serious_python_windows/windows/python_versions.properties b/src/serious_python_windows/windows/python_versions.properties index 5487bb07..faf98a2e 100644 --- a/src/serious_python_windows/windows/python_versions.properties +++ b/src/serious_python_windows/windows/python_versions.properties @@ -1,8 +1,8 @@ # GENERATED by `dart run serious_python:gen_version_tables` from -# python-build manifest.json (release 20260630). Do not edit by hand. +# python-build manifest.json (release 20260701). Do not edit by hand. default_python_version=3.14 dart_bridge_version=1.4.1 -python_build_release_date=20260630 +python_build_release_date=20260701 3.12.full_version=3.12.13 3.12.android_abis=arm64-v8a,x86_64,armeabi-v7a 3.13.full_version=3.13.14