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
113 changes: 113 additions & 0 deletions .claude/skills/prepare-release/SKILL.md
Original file line number Diff line number Diff line change
@@ -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 <lastTag>..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/<version>`.

## 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 <newDate> --repo flet-dev/python-build
gh api repos/flet-dev/python-build/compare/<oldDate>...<newDate> \
--jq '.commits[] | "- " + (.commit.message | split("\n")[0])'
# and diff the manifests to see which version fields, if any, moved:
# curl -sL .../download/<oldDate>/manifest.json vs <newDate>/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 <newDate>
```
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 "<oldVersion>" 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 <newDate>; <platform>
runtimes are byte-identical to <oldDate>.`).
- 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: <headline>") 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.
5 changes: 5 additions & 0 deletions src/serious_python/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 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 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";
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 = "20260630";
const pythonReleaseDate = "20260701";
const dartBridgeVersion = "1.4.1";
const defaultPythonVersion = "3.14";

Expand Down
2 changes: 1 addition & 1 deletion src/serious_python/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 4 additions & 0 deletions src/serious_python_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/serious_python_android/android/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ buildscript {
}

group = "com.flet.serious_python_android"
version = "4.2.0"
version = "4.2.1"

rootProject.allprojects {
repositories {
Expand Down
4 changes: 2 additions & 2 deletions src/serious_python_android/android/python_versions.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/serious_python_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 5 additions & 0 deletions src/serious_python_darwin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/serious_python_darwin/darwin/python_versions.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/serious_python_darwin/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/serious_python_linux/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/serious_python_linux/linux/python_versions.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/serious_python_linux/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 4 additions & 0 deletions src/serious_python_platform_interface/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/serious_python_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions src/serious_python_windows/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/serious_python_windows/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions src/serious_python_windows/windows/python_versions.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading