Skip to content

Commit a514b77

Browse files
FeodorFitsnerclaude
andcommitted
Prepare release 1.0.1 (Android: cache Python dist tarballs)
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>
1 parent 0b656b5 commit a514b77

20 files changed

Lines changed: 123 additions & 50 deletions

File tree

src/serious_python/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 1.0.1
2+
3+
### Improvements
4+
5+
* Cache downloaded Python distribution tarballs (`python-android-dart-<py>-<abi>.tar.gz`) across builds. The `downloadDistArchive_*` Gradle tasks now write to a persistent cache directory — `$FLET_CACHE_DIR/python-build/v<python_version>/` if the env var is set, otherwise `~/.flet/cache/python-build/v<python_version>/` — and use `onlyIfModified true` + `useETag "all"` so subsequent builds issue a conditional GET (`If-None-Match` / `If-Modified-Since`) against `objects.githubusercontent.com` instead of re-downloading 30–100 MB per ABI per build. When the upstream release republishes a tarball at the same URL (e.g. a Python patch update under the existing `v<py>` release), the validators flip and the cache refreshes automatically; otherwise the build skips the download entirely. `tempAndMove true` guards against partial downloads being kept in the cache ([flet-dev/flet#6555](https://github.com/flet-dev/flet/discussions/6555)) by @FeodorFitsner.
6+
7+
### Bug fixes
8+
9+
* Set `PIP_REQUIRE_VIRTUALENV=false` for `pip install` in the `package` command so packaging works in environments where users have globally exported `PIP_REQUIRE_VIRTUALENV=true` ([#202](https://github.com/flet-dev/serious-python/pull/202), [#204](https://github.com/flet-dev/serious-python/pull/204)) by @FeodorFitsner.
10+
111
## 1.0.0
212

313
* **Breaking change:** `--platform` argument value `Pyodide` has been renamed to `Emscripten` to match what `platform.system()` returns in the Pyodide runtime, so PEP 508 markers like `platform_system != 'Emscripten'` work consistently.

src/serious_python/example/flask_example/android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
**/.cxx/
89

910
# Remember to never publicly share your keystore.
1011
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app

src/serious_python/example/flask_example/pubspec.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,42 +289,42 @@ packages:
289289
path: "../.."
290290
relative: true
291291
source: path
292-
version: "1.0.0"
292+
version: "1.0.1"
293293
serious_python_android:
294294
dependency: transitive
295295
description:
296296
path: "../../../serious_python_android"
297297
relative: true
298298
source: path
299-
version: "1.0.0"
299+
version: "1.0.1"
300300
serious_python_darwin:
301301
dependency: transitive
302302
description:
303303
path: "../../../serious_python_darwin"
304304
relative: true
305305
source: path
306-
version: "1.0.0"
306+
version: "1.0.1"
307307
serious_python_linux:
308308
dependency: transitive
309309
description:
310310
path: "../../../serious_python_linux"
311311
relative: true
312312
source: path
313-
version: "1.0.0"
313+
version: "1.0.1"
314314
serious_python_platform_interface:
315315
dependency: transitive
316316
description:
317317
path: "../../../serious_python_platform_interface"
318318
relative: true
319319
source: path
320-
version: "1.0.0"
320+
version: "1.0.1"
321321
serious_python_windows:
322322
dependency: transitive
323323
description:
324324
path: "../../../serious_python_windows"
325325
relative: true
326326
source: path
327-
version: "1.0.0"
327+
version: "1.0.1"
328328
shelf:
329329
dependency: transitive
330330
description:

src/serious_python/example/flet_example/android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
**/.cxx/
89

910
# Remember to never publicly share your keystore.
1011
# See https://flutter.dev/to/reference-keystore

src/serious_python/example/flet_example/pubspec.lock

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ packages:
3737
dependency: transitive
3838
description:
3939
name: characters
40-
sha256: faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b
40+
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
4141
url: "https://pub.dev"
4242
source: hosted
43-
version: "1.4.1"
43+
version: "1.4.0"
4444
clock:
4545
dependency: transitive
4646
description:
@@ -117,10 +117,10 @@ packages:
117117
dependency: transitive
118118
description:
119119
name: fake_async
120-
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
120+
sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc"
121121
url: "https://pub.dev"
122122
source: hosted
123-
version: "1.3.3"
123+
version: "1.3.2"
124124
ffi:
125125
dependency: transitive
126126
description:
@@ -280,10 +280,10 @@ packages:
280280
dependency: transitive
281281
description:
282282
name: intl
283-
sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5"
283+
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
284284
url: "https://pub.dev"
285285
source: hosted
286-
version: "0.20.2"
286+
version: "0.19.0"
287287
js:
288288
dependency: transitive
289289
description:
@@ -304,26 +304,26 @@ packages:
304304
dependency: transitive
305305
description:
306306
name: leak_tracker
307-
sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de"
307+
sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec
308308
url: "https://pub.dev"
309309
source: hosted
310-
version: "11.0.2"
310+
version: "10.0.8"
311311
leak_tracker_flutter_testing:
312312
dependency: transitive
313313
description:
314314
name: leak_tracker_flutter_testing
315-
sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1"
315+
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
316316
url: "https://pub.dev"
317317
source: hosted
318-
version: "3.0.10"
318+
version: "3.0.9"
319319
leak_tracker_testing:
320320
dependency: transitive
321321
description:
322322
name: leak_tracker_testing
323-
sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1"
323+
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
324324
url: "https://pub.dev"
325325
source: hosted
326-
version: "3.0.2"
326+
version: "3.0.1"
327327
lints:
328328
dependency: transitive
329329
description:
@@ -352,26 +352,26 @@ packages:
352352
dependency: transitive
353353
description:
354354
name: matcher
355-
sha256: dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861
355+
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
356356
url: "https://pub.dev"
357357
source: hosted
358-
version: "0.12.19"
358+
version: "0.12.17"
359359
material_color_utilities:
360360
dependency: transitive
361361
description:
362362
name: material_color_utilities
363-
sha256: "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b"
363+
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
364364
url: "https://pub.dev"
365365
source: hosted
366-
version: "0.13.0"
366+
version: "0.11.1"
367367
meta:
368368
dependency: transitive
369369
description:
370370
name: meta
371-
sha256: "23f08335362185a5ea2ad3a4e597f1375e78bce8a040df5c600c8d3552ef2394"
371+
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
372372
url: "https://pub.dev"
373373
source: hosted
374-
version: "1.17.0"
374+
version: "1.16.0"
375375
package_info_plus:
376376
dependency: "direct main"
377377
description:
@@ -562,42 +562,42 @@ packages:
562562
path: "../.."
563563
relative: true
564564
source: path
565-
version: "1.0.0"
565+
version: "1.0.1"
566566
serious_python_android:
567567
dependency: transitive
568568
description:
569569
path: "../../../serious_python_android"
570570
relative: true
571571
source: path
572-
version: "1.0.0"
572+
version: "1.0.1"
573573
serious_python_darwin:
574574
dependency: transitive
575575
description:
576576
path: "../../../serious_python_darwin"
577577
relative: true
578578
source: path
579-
version: "1.0.0"
579+
version: "1.0.1"
580580
serious_python_linux:
581581
dependency: transitive
582582
description:
583583
path: "../../../serious_python_linux"
584584
relative: true
585585
source: path
586-
version: "1.0.0"
586+
version: "1.0.1"
587587
serious_python_platform_interface:
588588
dependency: transitive
589589
description:
590590
path: "../../../serious_python_platform_interface"
591591
relative: true
592592
source: path
593-
version: "1.0.0"
593+
version: "1.0.1"
594594
serious_python_windows:
595595
dependency: transitive
596596
description:
597597
path: "../../../serious_python_windows"
598598
relative: true
599599
source: path
600-
version: "1.0.0"
600+
version: "1.0.1"
601601
shared_preferences:
602602
dependency: transitive
603603
description:
@@ -719,10 +719,10 @@ packages:
719719
dependency: transitive
720720
description:
721721
name: test_api
722-
sha256: "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a"
722+
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
723723
url: "https://pub.dev"
724724
source: hosted
725-
version: "0.7.10"
725+
version: "0.7.4"
726726
toml:
727727
dependency: transitive
728728
description:
@@ -839,10 +839,10 @@ packages:
839839
dependency: transitive
840840
description:
841841
name: vector_math
842-
sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b
842+
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
843843
url: "https://pub.dev"
844844
source: hosted
845-
version: "2.2.0"
845+
version: "2.1.4"
846846
vm_service:
847847
dependency: transitive
848848
description:
@@ -924,5 +924,5 @@ packages:
924924
source: hosted
925925
version: "6.5.0"
926926
sdks:
927-
dart: ">=3.9.0-0 <4.0.0"
927+
dart: ">=3.7.0 <4.0.0"
928928
flutter: ">=3.22.0"

src/serious_python/example/run_example/android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
**/.cxx/
89

910
# Remember to never publicly share your keystore.
1011
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app

src/serious_python/example/run_example/pubspec.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -312,42 +312,42 @@ packages:
312312
path: "../.."
313313
relative: true
314314
source: path
315-
version: "1.0.0"
315+
version: "1.0.1"
316316
serious_python_android:
317317
dependency: transitive
318318
description:
319319
path: "../../../serious_python_android"
320320
relative: true
321321
source: path
322-
version: "1.0.0"
322+
version: "1.0.1"
323323
serious_python_darwin:
324324
dependency: transitive
325325
description:
326326
path: "../../../serious_python_darwin"
327327
relative: true
328328
source: path
329-
version: "1.0.0"
329+
version: "1.0.1"
330330
serious_python_linux:
331331
dependency: transitive
332332
description:
333333
path: "../../../serious_python_linux"
334334
relative: true
335335
source: path
336-
version: "1.0.0"
336+
version: "1.0.1"
337337
serious_python_platform_interface:
338338
dependency: transitive
339339
description:
340340
path: "../../../serious_python_platform_interface"
341341
relative: true
342342
source: path
343-
version: "1.0.0"
343+
version: "1.0.1"
344344
serious_python_windows:
345345
dependency: transitive
346346
description:
347347
path: "../../../serious_python_windows"
348348
relative: true
349349
source: path
350-
version: "1.0.0"
350+
version: "1.0.1"
351351
shelf:
352352
dependency: transitive
353353
description:

src/serious_python/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: serious_python
22
description: A cross-platform plugin for adding embedded Python runtime to your Flutter apps.
33
homepage: https://flet.dev
44
repository: https://github.com/flet-dev/serious-python
5-
version: 1.0.0
5+
version: 1.0.1
66

77
platforms:
88
ios:

src/serious_python_android/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## 1.0.1
2+
3+
### Improvements
4+
5+
* Cache downloaded Python distribution tarballs (`python-android-dart-<py>-<abi>.tar.gz`) across builds. The `downloadDistArchive_*` Gradle tasks now write to a persistent cache directory — `$FLET_CACHE_DIR/python-build/v<python_version>/` if the env var is set, otherwise `~/.flet/cache/python-build/v<python_version>/` — and use `onlyIfModified true` + `useETag "all"` so subsequent builds issue a conditional GET (`If-None-Match` / `If-Modified-Since`) against `objects.githubusercontent.com` instead of re-downloading 30–100 MB per ABI per build. When the upstream release republishes a tarball at the same URL (e.g. a Python patch update under the existing `v<py>` release), the validators flip and the cache refreshes automatically; otherwise the build skips the download entirely. `tempAndMove true` guards against partial downloads being kept in the cache ([flet-dev/flet#6555](https://github.com/flet-dev/flet/discussions/6555)) by @FeodorFitsner.
6+
7+
### Bug fixes
8+
9+
* Set `PIP_REQUIRE_VIRTUALENV=false` for `pip install` in the `package` command so packaging works in environments where users have globally exported `PIP_REQUIRE_VIRTUALENV=true` ([#202](https://github.com/flet-dev/serious-python/pull/202), [#204](https://github.com/flet-dev/serious-python/pull/204)) by @FeodorFitsner.
10+
111
## 1.0.0
212

313
* **Breaking change:** `--platform` argument value `Pyodide` has been renamed to `Emscripten` to match what `platform.system()` returns in the Pyodide runtime, so PEP 508 markers like `platform_system != 'Emscripten'` work consistently.

src/serious_python_android/android/build.gradle

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group 'com.flet.serious_python_android'
2-
version '1.0.0'
2+
version '1.0.1'
33

44
def python_version = '3.12'
55

@@ -71,6 +71,12 @@ android {
7171

7272
import de.undercouch.gradle.tasks.download.Download
7373

74+
def fletCacheRoot = System.getenv('FLET_CACHE_DIR')
75+
def pythonCacheDir = new File(
76+
fletCacheRoot ? new File(fletCacheRoot) : new File(System.getProperty('user.home'), '.flet/cache'),
77+
"python-build/v${python_version}"
78+
)
79+
7480
task copyBuildDist(type: Copy) {
7581
def srcDir = System.getenv('SERIOUS_PYTHON_BUILD_DIST')
7682
if (srcDir != null) {
@@ -97,7 +103,11 @@ android.defaultConfig.ndk.abiFilters.each { abi ->
97103

98104
tasks.register("downloadDistArchive_$abi", Download) {
99105
src "https://github.com/flet-dev/python-build/releases/download/v${python_version}/python-android-dart-${python_version}-${abi}.tar.gz"
100-
dest new File(buildDir, "python-android-${abi}.tar.gz")
106+
dest new File(pythonCacheDir, "python-android-dart-${python_version}-${abi}.tar.gz")
107+
onlyIfModified true
108+
useETag "all"
109+
tempAndMove true
110+
doFirst { dest.parentFile.mkdirs() }
101111
}
102112
tasks.register("untarFile_$abi", Copy) {
103113
from tarTree(tasks.named("downloadDistArchive_$abi").get().dest)

0 commit comments

Comments
 (0)