Skip to content

Prepare release 1.0.1 (Android: cache Python dist tarballs)#208

Merged
FeodorFitsner merged 2 commits into
mainfrom
android-cache
Jun 6, 2026
Merged

Prepare release 1.0.1 (Android: cache Python dist tarballs)#208
FeodorFitsner merged 2 commits into
mainfrom
android-cache

Conversation

@FeodorFitsner
Copy link
Copy Markdown
Contributor

Summary

Fixes flet-dev/flet#6555flet debug android was re-downloading the three python-android-dart-3.12-<abi>.tar.gz tarballs (~30–100 MB each) on every build, often the dominant cost of a debug cycle.

  • The downloadDistArchive_* Gradle tasks in serious_python_android now write to a persistent cache dir — $FLET_CACHE_DIR/python-build/v<python_version>/ if set, otherwise ~/.flet/cache/python-build/v<python_version>/ — and run with onlyIfModified true + useETag "all" + tempAndMove true. Subsequent builds issue a conditional GET (If-None-Match / If-Modified-Since) against objects.githubusercontent.com instead of re-downloading the full tarball, so when the upstream release re-publishes a tarball at the same versioned URL (e.g. a Python patch update under the existing v3.12 release) the validators flip and the cache refreshes automatically; otherwise the build skips the download entirely. tempAndMove guards against partial downloads being kept in the cache.
  • All packages bumped to 1.0.1 (serious_python, serious_python_android, serious_python_darwin, serious_python_linux, serious_python_windows, serious_python_platform_interface) with identical changelog entries — matches the monorepo-style coordinated-release pattern used for 1.0.0.
  • The 1.0.1 changelog also rolls in the PIP_REQUIRE_VIRTUALENV=false fix from Define PIP_REQUIRE_VIRTUALENV=false to make package command work in some environments #202 / Set PIP_REQUIRE_VIRTUALENV=false to make package command work in restricted environments #204 (merged on main after 1.0.0 but never written into a release note).
  • Adds **/.cxx/ to the three example android/.gitignore files so Gradle CMake build output stops showing up as untracked noise during local testing.

The matching flet CLI side (build-template caching + FLET_CACHE_DIR env propagation + serious_python pin bump to 1.0.1) will be opened as a separate PR against flet-dev/flet.

Test plan

  • Cold run: delete ~/.flet/cache/ and run flet debug android -vv against a sample app — confirm the three tarballs land under ~/.flet/cache/python-build/v3.12/ and the build succeeds.
  • Warm run: run the same command again — Gradle logs should show downloadDistArchive_* tasks completing in ~1 round-trip per ABI (a 304) instead of full downloads; end-to-end wall time drops by minutes.
  • Re-publish invalidation: hand-edit the gradle-download-task .etag / .lastModified sidecars next to a cached tarball to a stale value, re-run, and confirm the conditional GET issues a re-download.
  • FLET_CACHE_DIR override: FLET_CACHE_DIR=/tmp/flet-cache flet debug android — confirm tarballs land under /tmp/flet-cache/python-build/v3.12/.
  • Offline with warm cache: kill network, run again with a populated cache — build should still succeed.

🤖 Generated with Claude Code

FeodorFitsner and others added 2 commits June 6, 2026 11:03
Bump all packages to 1.0.1 and add changelog entries for the new
persistent Python tarball cache in the serious_python_android Gradle
plugin: downloadDistArchive_* now writes to $FLET_CACHE_DIR/python-build/
(defaulting to ~/.flet/cache/python-build/) with onlyIfModified +
useETag "all", so subsequent builds issue a conditional GET against
objects.githubusercontent.com instead of re-downloading 30-100 MB per
ABI. Re-published tarballs at the same versioned URL are picked up
automatically via ETag/Last-Modified validators. Fixes
flet-dev/flet#6555.

Also rolls the PIP_REQUIRE_VIRTUALENV=false fix from #202/#204 into the
1.0.1 changelog (landed on main after 1.0.0), and adds **/.cxx/ to the
example android/.gitignore files to keep CMake build output out of git.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@FeodorFitsner FeodorFitsner merged commit 55f1c7f into main Jun 6, 2026
8 of 15 checks passed
@FeodorFitsner FeodorFitsner deleted the android-cache branch June 6, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant