From f6fc882f8bc87b519c2f1d3c10235e079e38cf9e Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Thu, 10 Apr 2025 09:21:42 -0700 Subject: [PATCH 01/24] Fix: hidden files in site-packages are skipped when building macOS app Fix https://github.com/flet-dev/flet/issues/5204#issuecomment-2793607490 --- src/serious_python/CHANGELOG.md | 4 + .../example/run_example/app/app.zip.hash | 2 +- .../run_example/app/src/requirements.txt | 2 +- .../example/run_example/macos/Podfile.lock | 4 +- .../xcshareddata/xcschemes/Runner.xcscheme | 1 + .../example/run_example/pubspec.lock | 86 +++++++++---------- src/serious_python/pubspec.yaml | 2 +- src/serious_python_android/CHANGELOG.md | 4 + .../android/build.gradle | 2 +- src/serious_python_android/pubspec.yaml | 2 +- src/serious_python_darwin/CHANGELOG.md | 4 + .../darwin/serious_python_darwin.podspec | 2 +- .../darwin/sync_site_packages.sh | 2 +- src/serious_python_darwin/pubspec.yaml | 2 +- src/serious_python_linux/CHANGELOG.md | 4 + src/serious_python_linux/pubspec.yaml | 2 +- .../CHANGELOG.md | 4 + .../pubspec.yaml | 2 +- src/serious_python_windows/CHANGELOG.md | 4 + src/serious_python_windows/pubspec.yaml | 2 +- 20 files changed, 81 insertions(+), 56 deletions(-) diff --git a/src/serious_python/CHANGELOG.md b/src/serious_python/CHANGELOG.md index 3ffa74e0..138315b5 100644 --- a/src/serious_python/CHANGELOG.md +++ b/src/serious_python/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.3 + +* Fix: Hidden files in site-packages are skipped when building macOS app. + ## 0.9.2 * Breaking change: multiple `--requirements` options of `package` command must be passed as `--requirements DEP_1 --requirements DEP_2 ...` (or `-r DEP_1 -r DEP_2 ...`) instead of `-r DEP_1,DEP_2,...` to support dependency specifications with commas, e.g. `pandas>=2.2,<3`. diff --git a/src/serious_python/example/run_example/app/app.zip.hash b/src/serious_python/example/run_example/app/app.zip.hash index ed5ee6e8..615dadf3 100644 --- a/src/serious_python/example/run_example/app/app.zip.hash +++ b/src/serious_python/example/run_example/app/app.zip.hash @@ -1 +1 @@ -f191238eabf7628dcbb3a2671a20407a5338b7c375c015bf177ece347228b8ea \ No newline at end of file +2b009202b20832851c62f09fd3dc603131d9efa45da27efb94eb21b32da28ed0 \ No newline at end of file diff --git a/src/serious_python/example/run_example/app/src/requirements.txt b/src/serious_python/example/run_example/app/src/requirements.txt index 50630e5d..7576bb83 100644 --- a/src/serious_python/example/run_example/app/src/requirements.txt +++ b/src/serious_python/example/run_example/app/src/requirements.txt @@ -1,4 +1,4 @@ -numpy +numpy==1.26.4 #lru-dict #pyjnius #flet-libsodium diff --git a/src/serious_python/example/run_example/macos/Podfile.lock b/src/serious_python/example/run_example/macos/Podfile.lock index 80a295c4..6ee684c8 100644 --- a/src/serious_python/example/run_example/macos/Podfile.lock +++ b/src/serious_python/example/run_example/macos/Podfile.lock @@ -3,7 +3,7 @@ PODS: - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS - - serious_python_darwin (0.9.0): + - serious_python_darwin (0.9.2): - Flutter - FlutterMacOS @@ -23,7 +23,7 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564 - serious_python_darwin: 42f1e341ed20ad30072bf0fa15cc9406ffe0d631 + serious_python_darwin: 5e7e55250432119e32b7605144da0d592d39f3cc PODFILE CHECKSUM: 9ebaf0ce3d369aaa26a9ea0e159195ed94724cf3 diff --git a/src/serious_python/example/run_example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/src/serious_python/example/run_example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 67a07e71..9391cf32 100644 --- a/src/serious_python/example/run_example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/src/serious_python/example/run_example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -59,6 +59,7 @@ ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" + enableGPUValidationMode = "1" allowLocationSimulation = "YES"> diff --git a/src/serious_python/example/run_example/pubspec.lock b/src/serious_python/example/run_example/pubspec.lock index 94e4ede3..b77862fe 100644 --- a/src/serious_python/example/run_example/pubspec.lock +++ b/src/serious_python/example/run_example/pubspec.lock @@ -21,42 +21,42 @@ packages: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.12.0" boolean_selector: dependency: transitive description: name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" characters: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" clock: dependency: transitive description: name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" collection: dependency: transitive description: name: collection - sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "1.19.0" + version: "1.19.1" crypto: dependency: transitive description: @@ -77,10 +77,10 @@ packages: dependency: transitive description: name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" ffi: dependency: transitive description: @@ -93,10 +93,10 @@ packages: dependency: transitive description: name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "7.0.1" flutter: dependency: "direct main" description: flutter @@ -158,18 +158,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec url: "https://pub.dev" source: hosted - version: "10.0.7" + version: "10.0.8" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 url: "https://pub.dev" source: hosted - version: "3.0.8" + version: "3.0.9" leak_tracker_testing: dependency: transitive description: @@ -190,10 +190,10 @@ packages: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 url: "https://pub.dev" source: hosted - version: "0.12.16+1" + version: "0.12.17" material_color_utilities: dependency: transitive description: @@ -206,18 +206,18 @@ packages: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.16.0" path: dependency: "direct main" description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" path_provider: dependency: "direct main" description: @@ -278,10 +278,10 @@ packages: dependency: transitive description: name: platform - sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" url: "https://pub.dev" source: hosted - version: "3.1.5" + version: "3.1.6" plugin_platform_interface: dependency: transitive description: @@ -294,10 +294,10 @@ packages: dependency: transitive description: name: process - sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" + sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d" url: "https://pub.dev" source: hosted - version: "5.0.2" + version: "5.0.3" serious_python: dependency: "direct main" description: @@ -357,34 +357,34 @@ packages: dependency: transitive description: name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.10.1" stack_trace: dependency: transitive description: name: stack_trace - sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.12.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" string_scanner: dependency: transitive description: name: string_scanner - sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.1" sync_http: dependency: transitive description: @@ -397,18 +397,18 @@ packages: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" test_api: dependency: transitive description: name: test_api - sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd url: "https://pub.dev" source: hosted - version: "0.7.3" + version: "0.7.4" toml: dependency: transitive description: @@ -437,10 +437,10 @@ packages: dependency: transitive description: name: vm_service - sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "14.3.1" web: dependency: transitive description: @@ -466,5 +466,5 @@ packages: source: hosted version: "1.0.4" sdks: - dart: ">=3.4.0 <4.0.0" + dart: ">=3.7.0-0 <4.0.0" flutter: ">=3.22.0" diff --git a/src/serious_python/pubspec.yaml b/src/serious_python/pubspec.yaml index ce367121..2684f173 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: 0.9.2 +version: 0.9.3 platforms: ios: diff --git a/src/serious_python_android/CHANGELOG.md b/src/serious_python_android/CHANGELOG.md index ade1a1ad..39b54152 100644 --- a/src/serious_python_android/CHANGELOG.md +++ b/src/serious_python_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.3 + +* Fix: Hidden files in site-packages are skipped when building macOS app. + ## 0.9.2 * Breaking change: multiple `--requirements` options of `package` command must be passed as `--requirements DEP_1 --requirements DEP_2 ...` (or `-r DEP_1 -r DEP_2 ...`) instead of `-r DEP_1,DEP_2,...` to support dependency specifications with commas, e.g. `pandas>=2.2,<3`. diff --git a/src/serious_python_android/android/build.gradle b/src/serious_python_android/android/build.gradle index 01d7e2f3..52c5bb08 100644 --- a/src/serious_python_android/android/build.gradle +++ b/src/serious_python_android/android/build.gradle @@ -1,5 +1,5 @@ group 'com.flet.serious_python_android' -version '0.9.2' +version '0.9.3' def python_version = '3.12' diff --git a/src/serious_python_android/pubspec.yaml b/src/serious_python_android/pubspec.yaml index 9aa63a37..e668e498 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: 0.9.2 +version: 0.9.3 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 4170680c..db9332c6 100644 --- a/src/serious_python_darwin/CHANGELOG.md +++ b/src/serious_python_darwin/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.3 + +* Fix: Hidden files in site-packages are skipped when building macOS app. + ## 0.9.2 * Breaking change: multiple `--requirements` options of `package` command must be passed as `--requirements DEP_1 --requirements DEP_2 ...` (or `-r DEP_1 -r DEP_2 ...`) instead of `-r DEP_1,DEP_2,...` to support dependency specifications with commas, e.g. `pandas>=2.2,<3`. diff --git a/src/serious_python_darwin/darwin/serious_python_darwin.podspec b/src/serious_python_darwin/darwin/serious_python_darwin.podspec index e2f9c075..c73af73d 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 = '0.9.2' + s.version = '0.9.3' 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/darwin/sync_site_packages.sh b/src/serious_python_darwin/darwin/sync_site_packages.sh index 085005f2..4864d631 100755 --- a/src/serious_python_darwin/darwin/sync_site_packages.sh +++ b/src/serious_python_darwin/darwin/sync_site_packages.sh @@ -43,7 +43,7 @@ if [[ -n "$SERIOUS_PYTHON_SITE_PACKAGES" && -d "$SERIOUS_PYTHON_SITE_PACKAGES" ] dist=$script_dir/dist_macos mkdir -p $dist/site-packages - rsync -av --exclude=".*" --delete "$SERIOUS_PYTHON_SITE_PACKAGES/" "$dist/site-packages/" + rsync -av --delete "$SERIOUS_PYTHON_SITE_PACKAGES/" "$dist/site-packages/" fi else echo "SERIOUS_PYTHON_SITE_PACKAGES is not set." diff --git a/src/serious_python_darwin/pubspec.yaml b/src/serious_python_darwin/pubspec.yaml index 659499c5..1afc3908 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: 0.9.2 +version: 0.9.3 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/src/serious_python_linux/CHANGELOG.md b/src/serious_python_linux/CHANGELOG.md index 53892769..2d2087ac 100644 --- a/src/serious_python_linux/CHANGELOG.md +++ b/src/serious_python_linux/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.3 + +* Fix: Hidden files in site-packages are skipped when building macOS app. + ## 0.9.2 * Breaking change: multiple `--requirements` options of `package` command must be passed as `--requirements DEP_1 --requirements DEP_2 ...` (or `-r DEP_1 -r DEP_2 ...`) instead of `-r DEP_1,DEP_2,...` to support dependency specifications with commas, e.g. `pandas>=2.2,<3`. diff --git a/src/serious_python_linux/pubspec.yaml b/src/serious_python_linux/pubspec.yaml index 651300f8..f26b2c20 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: 0.9.2 +version: 0.9.3 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 9b0762b7..f14a7cba 100644 --- a/src/serious_python_platform_interface/CHANGELOG.md +++ b/src/serious_python_platform_interface/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.3 + +* Fix: Hidden files in site-packages are skipped when building macOS app. + ## 0.9.2 * Breaking change: multiple `--requirements` options of `package` command must be passed as `--requirements DEP_1 --requirements DEP_2 ...` (or `-r DEP_1 -r DEP_2 ...`) instead of `-r DEP_1,DEP_2,...` to support dependency specifications with commas, e.g. `pandas>=2.2,<3`. diff --git a/src/serious_python_platform_interface/pubspec.yaml b/src/serious_python_platform_interface/pubspec.yaml index 1823cc09..8e892462 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: 0.9.2 +version: 0.9.3 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 6811f2bc..4f651e1c 100644 --- a/src/serious_python_windows/CHANGELOG.md +++ b/src/serious_python_windows/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.3 + +* Fix: Hidden files in site-packages are skipped when building macOS app. + ## 0.9.2 * Breaking change: multiple `--requirements` options of `package` command must be passed as `--requirements DEP_1 --requirements DEP_2 ...` (or `-r DEP_1 -r DEP_2 ...`) instead of `-r DEP_1,DEP_2,...` to support dependency specifications with commas, e.g. `pandas>=2.2,<3`. diff --git a/src/serious_python_windows/pubspec.yaml b/src/serious_python_windows/pubspec.yaml index 439a50e0..9042d100 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: 0.9.2 +version: 0.9.3 environment: sdk: '>=3.1.3 <4.0.0' From 310bebda43538dfd8df10562a4fe9409629aab3e Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Thu, 10 Apr 2025 09:38:00 -0700 Subject: [PATCH 02/24] Fix tests --- src/serious_python/example/flet_example/app/src/main_async.py | 4 ++-- .../example/flet_example/app/src/requirements.txt | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/serious_python/example/flet_example/app/src/main_async.py b/src/serious_python/example/flet_example/app/src/main_async.py index c8274bc9..38f363de 100644 --- a/src/serious_python/example/flet_example/app/src/main_async.py +++ b/src/serious_python/example/flet_example/app/src/main_async.py @@ -23,10 +23,10 @@ async def plus_click(e): ft.Row( [ ft.IconButton( - ft.icons.REMOVE, key="test:decrement", on_click=minus_click + ft.Icons.REMOVE, key="test:decrement", on_click=minus_click ), txt_number, - ft.IconButton(ft.icons.ADD, key="test:increment", on_click=plus_click), + ft.IconButton(ft.Icons.ADD, key="test:increment", on_click=plus_click), ], alignment=ft.MainAxisAlignment.CENTER, ) diff --git a/src/serious_python/example/flet_example/app/src/requirements.txt b/src/serious_python/example/flet_example/app/src/requirements.txt index 69e3fc44..4c3173f6 100644 --- a/src/serious_python/example/flet_example/app/src/requirements.txt +++ b/src/serious_python/example/flet_example/app/src/requirements.txt @@ -1,2 +1 @@ ---pre flet \ No newline at end of file From 6c24e5b209a4a3ffca46102715a84328101f1b40 Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Thu, 10 Apr 2025 10:52:45 -0700 Subject: [PATCH 03/24] Fix tests, again --- src/serious_python/example/flet_example/app/src/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/serious_python/example/flet_example/app/src/main.py b/src/serious_python/example/flet_example/app/src/main.py index d5b88739..4abac528 100644 --- a/src/serious_python/example/flet_example/app/src/main.py +++ b/src/serious_python/example/flet_example/app/src/main.py @@ -44,10 +44,10 @@ def check_ssl(e): ft.Row( [ ft.IconButton( - ft.icons.REMOVE, key="test:decrement", on_click=minus_click + ft.Icons.REMOVE, key="test:decrement", on_click=minus_click ), txt_number, - ft.IconButton(ft.icons.ADD, key="test:increment", on_click=plus_click), + ft.IconButton(ft.Icons.ADD, key="test:increment", on_click=plus_click), ], alignment=ft.MainAxisAlignment.CENTER, expand=True, From d697666dcad1d79e41aa8902c8680005fefc404a Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Fri, 22 Aug 2025 12:23:28 -0700 Subject: [PATCH 04/24] Remove .dist-info from junk files --- src/serious_python/bin/package_command.dart | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/serious_python/bin/package_command.dart b/src/serious_python/bin/package_command.dart index 7b123d15..a95e9dcc 100644 --- a/src/serious_python/bin/package_command.dart +++ b/src/serious_python/bin/package_command.dart @@ -71,7 +71,6 @@ const junkFilesDesktop = [ "**.pyx", "**.a", "**.pdb", - "**.dist-info", "__pycache__", "**/__pycache__", ]; @@ -217,9 +216,7 @@ class PackageCommand extends Command { } // asset path - if (assetPath == null) { - assetPath = "app/app.zip"; - } else if (assetPath.startsWith("/") || assetPath.startsWith("\\")) { + if (assetPath.startsWith("/") || assetPath.startsWith("\\")) { assetPath = assetPath.substring(1); } From 6d8f914bf2e212baae7f3dead246d413364d8a51 Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Fri, 22 Aug 2025 12:29:12 -0700 Subject: [PATCH 05/24] Update changelogs to note .dist-info metadata fix Added a changelog entry for all platforms documenting the fix that prevents deletion of package metadata in `.dist-info` directories, addressing issue #164. --- src/serious_python/CHANGELOG.md | 1 + src/serious_python_android/CHANGELOG.md | 1 + src/serious_python_darwin/CHANGELOG.md | 1 + src/serious_python_linux/CHANGELOG.md | 1 + src/serious_python_platform_interface/CHANGELOG.md | 1 + src/serious_python_windows/CHANGELOG.md | 1 + 6 files changed, 6 insertions(+) diff --git a/src/serious_python/CHANGELOG.md b/src/serious_python/CHANGELOG.md index 138315b5..c6a429d9 100644 --- a/src/serious_python/CHANGELOG.md +++ b/src/serious_python/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.9.3 * Fix: Hidden files in site-packages are skipped when building macOS app. +* Fix: Do not delete package metadata in `.dist-info` directories ([#164](https://github.com/flet-dev/serious-python/issues/164)). ## 0.9.2 diff --git a/src/serious_python_android/CHANGELOG.md b/src/serious_python_android/CHANGELOG.md index 39b54152..075ab98c 100644 --- a/src/serious_python_android/CHANGELOG.md +++ b/src/serious_python_android/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.9.3 * Fix: Hidden files in site-packages are skipped when building macOS app. +* Fix: Do not delete package metadata in `.dist-info` directories ([#164](https://github.com/flet-dev/serious-python/issues/164)). ## 0.9.2 diff --git a/src/serious_python_darwin/CHANGELOG.md b/src/serious_python_darwin/CHANGELOG.md index db9332c6..07cd93da 100644 --- a/src/serious_python_darwin/CHANGELOG.md +++ b/src/serious_python_darwin/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.9.3 * Fix: Hidden files in site-packages are skipped when building macOS app. +* Fix: Do not delete package metadata in `.dist-info` directories ([#164](https://github.com/flet-dev/serious-python/issues/164)). ## 0.9.2 diff --git a/src/serious_python_linux/CHANGELOG.md b/src/serious_python_linux/CHANGELOG.md index 2d2087ac..e4e42b45 100644 --- a/src/serious_python_linux/CHANGELOG.md +++ b/src/serious_python_linux/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.9.3 * Fix: Hidden files in site-packages are skipped when building macOS app. +* Fix: Do not delete package metadata in `.dist-info` directories ([#164](https://github.com/flet-dev/serious-python/issues/164)). ## 0.9.2 diff --git a/src/serious_python_platform_interface/CHANGELOG.md b/src/serious_python_platform_interface/CHANGELOG.md index f14a7cba..c66601dd 100644 --- a/src/serious_python_platform_interface/CHANGELOG.md +++ b/src/serious_python_platform_interface/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.9.3 * Fix: Hidden files in site-packages are skipped when building macOS app. +* Fix: Do not delete package metadata in `.dist-info` directories ([#164](https://github.com/flet-dev/serious-python/issues/164)). ## 0.9.2 diff --git a/src/serious_python_windows/CHANGELOG.md b/src/serious_python_windows/CHANGELOG.md index 4f651e1c..64dde934 100644 --- a/src/serious_python_windows/CHANGELOG.md +++ b/src/serious_python_windows/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.9.3 * Fix: Hidden files in site-packages are skipped when building macOS app. +* Fix: Do not delete package metadata in `.dist-info` directories ([#164](https://github.com/flet-dev/serious-python/issues/164)). ## 0.9.2 From 6ebe996827565fb1f7a429aa442b5e4e85b6549f Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Fri, 22 Aug 2025 12:55:22 -0700 Subject: [PATCH 06/24] Bump Flutter to 3.35.1, fix package command --- .appveyor.yml | 2 +- .fvmrc | 3 +++ src/serious_python/bin/package_command.dart | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .fvmrc diff --git a/.appveyor.yml b/.appveyor.yml index 00d678e6..760356be 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,7 +1,7 @@ skip_branch_with_pr: true environment: - FLUTTER_VERSION: 3.27.4 + FLUTTER_VERSION: 3.35.1 GITHUB_TOKEN: secure: 9SKIwc3VSfYJ5IChvNR74mEv2nb0ZFftUzn3sGRdXipXEfKSxY50DoodChHvlqZduQNhjg0oyLWAAa3n+iwWvVM2yI7Cgb14lFNClijz/kHI/PibnjDMNvLKaAygcfAc diff --git a/.fvmrc b/.fvmrc new file mode 100644 index 00000000..214e6584 --- /dev/null +++ b/.fvmrc @@ -0,0 +1,3 @@ +{ + "flutter": "3.35.1" +} diff --git a/src/serious_python/bin/package_command.dart b/src/serious_python/bin/package_command.dart index a95e9dcc..d70559e5 100644 --- a/src/serious_python/bin/package_command.dart +++ b/src/serious_python/bin/package_command.dart @@ -216,7 +216,8 @@ class PackageCommand extends Command { } // asset path - if (assetPath.startsWith("/") || assetPath.startsWith("\\")) { + if (assetPath != null && + (assetPath.startsWith("/") || assetPath.startsWith("\\"))) { assetPath = assetPath.substring(1); } From f8edb00a439a16c70bf7aa31e2dcb366061d9cce Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Fri, 22 Aug 2025 17:01:25 -0700 Subject: [PATCH 07/24] Set default assetPath if null in package command Assigns 'app/app.zip' as the default assetPath when none is provided, ensuring a valid path is always set. Also refactors the logic for handling leading slashes in assetPath. --- src/serious_python/bin/package_command.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/serious_python/bin/package_command.dart b/src/serious_python/bin/package_command.dart index d70559e5..bc10dd92 100644 --- a/src/serious_python/bin/package_command.dart +++ b/src/serious_python/bin/package_command.dart @@ -216,8 +216,9 @@ class PackageCommand extends Command { } // asset path - if (assetPath != null && - (assetPath.startsWith("/") || assetPath.startsWith("\\"))) { + if (assetPath == null) { + assetPath = "app/app.zip"; + } else if (assetPath.startsWith("/") || assetPath.startsWith("\\")) { assetPath = assetPath.substring(1); } From c17024d560eb7d8a2a8f450462f59a036f348bb3 Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Fri, 22 Aug 2025 17:18:14 -0700 Subject: [PATCH 08/24] Rollback Flet version --- .appveyor.yml | 2 +- .fvmrc | 2 +- src/serious_python/example/flet_example/pubspec.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 760356be..5c7ed348 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,7 +1,7 @@ skip_branch_with_pr: true environment: - FLUTTER_VERSION: 3.35.1 + FLUTTER_VERSION: 3.29.3 GITHUB_TOKEN: secure: 9SKIwc3VSfYJ5IChvNR74mEv2nb0ZFftUzn3sGRdXipXEfKSxY50DoodChHvlqZduQNhjg0oyLWAAa3n+iwWvVM2yI7Cgb14lFNClijz/kHI/PibnjDMNvLKaAygcfAc diff --git a/.fvmrc b/.fvmrc index 214e6584..07470f9c 100644 --- a/.fvmrc +++ b/.fvmrc @@ -1,3 +1,3 @@ { - "flutter": "3.35.1" + "flutter": "3.29.3" } diff --git a/src/serious_python/example/flet_example/pubspec.yaml b/src/serious_python/example/flet_example/pubspec.yaml index f8e5e4ee..31425e65 100644 --- a/src/serious_python/example/flet_example/pubspec.yaml +++ b/src/serious_python/example/flet_example/pubspec.yaml @@ -35,7 +35,7 @@ dependencies: serious_python: path: ../../ - flet: ^0.26.0 + flet: ^0.28.3 path: ^1.8.3 url_strategy: ^0.2.0 From 21016a76e5f1e85dcabd05154df88086bea25334 Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Fri, 22 Aug 2025 19:16:06 -0700 Subject: [PATCH 09/24] Remove hideLoadingPage from FletApp and update dependencies The hideLoadingPage property was removed from FletApp instantiations in main.dart to align with recent API changes. Updated pubspec.lock files for flask_example, flet_example, and run_example to reflect new package versions and dependency updates. --- .../example/flask_example/pubspec.lock | 92 ++++++------ .../example/flet_example/lib/main.dart | 2 - .../example/flet_example/pubspec.lock | 132 ++++++++++-------- .../example/run_example/pubspec.lock | 32 ++--- 4 files changed, 132 insertions(+), 126 deletions(-) diff --git a/src/serious_python/example/flask_example/pubspec.lock b/src/serious_python/example/flask_example/pubspec.lock index 2986e328..260ed69f 100644 --- a/src/serious_python/example/flask_example/pubspec.lock +++ b/src/serious_python/example/flask_example/pubspec.lock @@ -21,42 +21,42 @@ packages: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.13.0" boolean_selector: dependency: transitive description: name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" characters: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" clock: dependency: transitive description: name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" collection: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.1" crypto: dependency: transitive description: @@ -77,10 +77,10 @@ packages: dependency: transitive description: name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.3" ffi: dependency: transitive description: @@ -143,18 +143,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.9" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.9" leak_tracker_testing: dependency: transitive description: @@ -175,34 +175,34 @@ packages: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 url: "https://pub.dev" source: hosted - version: "0.12.16+1" + version: "0.12.17" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.16.0" path: dependency: transitive description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" path_provider: dependency: transitive description: @@ -281,42 +281,42 @@ packages: path: "../.." relative: true source: path - version: "0.9.0" + version: "0.9.3" serious_python_android: dependency: transitive description: path: "../../../serious_python_android" relative: true source: path - version: "0.9.0" + version: "0.9.3" serious_python_darwin: dependency: transitive description: path: "../../../serious_python_darwin" relative: true source: path - version: "0.9.0" + version: "0.9.3" serious_python_linux: dependency: transitive description: path: "../../../serious_python_linux" relative: true source: path - version: "0.9.0" + version: "0.9.3" serious_python_platform_interface: dependency: transitive description: path: "../../../serious_python_platform_interface" relative: true source: path - version: "0.9.0" + version: "0.9.3" serious_python_windows: dependency: transitive description: path: "../../../serious_python_windows" relative: true source: path - version: "0.9.0" + version: "0.9.3" shelf: dependency: transitive description: @@ -329,55 +329,55 @@ packages: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.10.1" stack_trace: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" string_scanner: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.4.1" term_glyph: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" test_api: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.4" toml: dependency: transitive description: @@ -406,10 +406,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "15.0.0" web: dependency: transitive description: @@ -427,5 +427,5 @@ packages: source: hosted version: "1.0.4" sdks: - dart: ">=3.4.0 <4.0.0" + dart: ">=3.7.0-0 <4.0.0" flutter: ">=3.22.0" diff --git a/src/serious_python/example/flet_example/lib/main.dart b/src/serious_python/example/flet_example/lib/main.dart index ee42376b..547bfe22 100644 --- a/src/serious_python/example/flet_example/lib/main.dart +++ b/src/serious_python/example/flet_example/lib/main.dart @@ -90,7 +90,6 @@ void main() async { ? FletApp( pageUrl: pageUrl, assetsDir: assetsDir, - hideLoadingPage: hideLoadingPage, ) : FutureBuilder( future: runPythonApp(), @@ -108,7 +107,6 @@ void main() async { return FletApp( pageUrl: pageUrl, assetsDir: assetsDir, - hideLoadingPage: hideLoadingPage, ); } }); diff --git a/src/serious_python/example/flet_example/pubspec.lock b/src/serious_python/example/flet_example/pubspec.lock index c3f79d69..01e6f551 100644 --- a/src/serious_python/example/flet_example/pubspec.lock +++ b/src/serious_python/example/flet_example/pubspec.lock @@ -21,42 +21,42 @@ packages: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.13.0" boolean_selector: dependency: transitive description: name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" characters: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" clock: dependency: transitive description: name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" collection: dependency: transitive description: name: collection - sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "1.18.0" + version: "1.19.1" cross_file: dependency: transitive description: @@ -81,6 +81,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.8" + dbus: + dependency: transitive + description: + name: dbus + sha256: "79e0c23480ff85dc68de79e2cd6334add97e48f7f4865d17686dd6ea81a47e8c" + url: "https://pub.dev" + source: hosted + version: "0.7.11" device_info_plus: dependency: transitive description: @@ -109,10 +117,10 @@ packages: dependency: transitive description: name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.3" ffi: dependency: transitive description: @@ -125,18 +133,18 @@ packages: dependency: transitive description: name: file - sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "7.0.1" file_picker: dependency: transitive description: name: file_picker - sha256: cacfdc5abe93e64d418caa9256eef663499ad791bb688d9fd12c85a311968fba + sha256: e7e16c9d15c36330b94ca0e2ad8cb61f93cd5282d0158c09805aed13b5452f22 url: "https://pub.dev" source: hosted - version: "8.3.2" + version: "10.3.2" fl_chart: dependency: transitive description: @@ -149,10 +157,10 @@ packages: dependency: "direct main" description: name: flet - sha256: "35550c48c77413cb97be1dfc8fe17192a22ae102927f269844a43a428b8cd212" + sha256: "3be85b7d2e70e00d957966a7bcec2b290057d440b7aafd795a197a39ab3783cf" url: "https://pub.dev" source: hosted - version: "0.26.0" + version: "0.28.3" flutter: dependency: "direct main" description: flutter @@ -272,10 +280,10 @@ packages: dependency: transitive description: name: intl - sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf + sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" url: "https://pub.dev" source: hosted - version: "0.19.0" + version: "0.20.2" js: dependency: transitive description: @@ -296,18 +304,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" + sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" url: "https://pub.dev" source: hosted - version: "10.0.4" + version: "10.0.9" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.0.9" leak_tracker_testing: dependency: transitive description: @@ -344,26 +352,26 @@ packages: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 url: "https://pub.dev" source: hosted - version: "0.12.16+1" + version: "0.12.17" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.16.0" package_info_plus: dependency: "direct main" description: @@ -384,10 +392,10 @@ packages: dependency: "direct main" description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" path_parsing: dependency: transitive description: @@ -456,10 +464,10 @@ packages: dependency: transitive description: name: platform - sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "3.1.6" plugin_platform_interface: dependency: transitive description: @@ -472,10 +480,10 @@ packages: dependency: transitive description: name: process - sha256: "21e54fd2faf1b5bdd5102afd25012184a6793927648ea81eea80552ac9405b32" + sha256: "107d8be718f120bbba9dcd1e95e3bd325b1b4a4f07db64154635ba03f2567a0d" url: "https://pub.dev" source: hosted - version: "5.0.2" + version: "5.0.3" redux: dependency: transitive description: @@ -546,42 +554,42 @@ packages: path: "../.." relative: true source: path - version: "0.9.0" + version: "0.9.3" serious_python_android: dependency: transitive description: path: "../../../serious_python_android" relative: true source: path - version: "0.9.0" + version: "0.9.3" serious_python_darwin: dependency: transitive description: path: "../../../serious_python_darwin" relative: true source: path - version: "0.9.0" + version: "0.9.3" serious_python_linux: dependency: transitive description: path: "../../../serious_python_linux" relative: true source: path - version: "0.9.0" + version: "0.9.3" serious_python_platform_interface: dependency: transitive description: path: "../../../serious_python_platform_interface" relative: true source: path - version: "0.9.0" + version: "0.9.3" serious_python_windows: dependency: transitive description: path: "../../../serious_python_windows" relative: true source: path - version: "0.9.0" + version: "0.9.3" shared_preferences: dependency: transitive description: @@ -650,39 +658,39 @@ packages: dependency: transitive description: flutter source: sdk - version: "0.0.99" + version: "0.0.0" source_span: dependency: transitive description: name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.10.1" stack_trace: dependency: transitive description: name: stack_trace - sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" url: "https://pub.dev" source: hosted - version: "1.11.1" + version: "1.12.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" string_scanner: dependency: transitive description: name: string_scanner - sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.4.1" sync_http: dependency: transitive description: @@ -695,18 +703,18 @@ packages: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" test_api: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.4" toml: dependency: transitive description: @@ -831,10 +839,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" + sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 url: "https://pub.dev" source: hosted - version: "14.2.1" + version: "15.0.0" web: dependency: transitive description: @@ -855,18 +863,18 @@ packages: dependency: transitive description: name: webdriver - sha256: "003d7da9519e1e5f329422b36c4dcdf18d7d2978d1ba099ea4e45ba490ed845e" + sha256: "2f3a14ca026957870cfd9c635b83507e0e51d8091568e90129fbf805aba7cade" url: "https://pub.dev" source: hosted - version: "3.0.3" + version: "3.1.0" win32: dependency: transitive description: name: win32 - sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" + sha256: "329edf97fdd893e0f1e3b9e88d6a0e627128cc17cc316a8d67fda8f1451178ba" url: "https://pub.dev" source: hosted - version: "5.5.4" + version: "5.13.0" win32_registry: dependency: transitive description: @@ -908,5 +916,5 @@ packages: source: hosted version: "6.5.0" sdks: - dart: ">=3.4.0 <4.0.0" + dart: ">=3.7.0 <4.0.0" flutter: ">=3.22.0" diff --git a/src/serious_python/example/run_example/pubspec.lock b/src/serious_python/example/run_example/pubspec.lock index b77862fe..d614cac1 100644 --- a/src/serious_python/example/run_example/pubspec.lock +++ b/src/serious_python/example/run_example/pubspec.lock @@ -21,10 +21,10 @@ packages: dependency: transitive description: name: async - sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" url: "https://pub.dev" source: hosted - version: "2.12.0" + version: "2.13.0" boolean_selector: dependency: transitive description: @@ -77,10 +77,10 @@ packages: dependency: transitive description: name: fake_async - sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" url: "https://pub.dev" source: hosted - version: "1.3.2" + version: "1.3.3" ffi: dependency: transitive description: @@ -158,10 +158,10 @@ packages: dependency: transitive description: name: leak_tracker - sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0" url: "https://pub.dev" source: hosted - version: "10.0.8" + version: "10.0.9" leak_tracker_flutter_testing: dependency: transitive description: @@ -304,42 +304,42 @@ packages: path: "../.." relative: true source: path - version: "0.9.2" + version: "0.9.3" serious_python_android: dependency: transitive description: path: "../../../serious_python_android" relative: true source: path - version: "0.9.2" + version: "0.9.3" serious_python_darwin: dependency: transitive description: path: "../../../serious_python_darwin" relative: true source: path - version: "0.9.2" + version: "0.9.3" serious_python_linux: dependency: transitive description: path: "../../../serious_python_linux" relative: true source: path - version: "0.9.2" + version: "0.9.3" serious_python_platform_interface: dependency: transitive description: path: "../../../serious_python_platform_interface" relative: true source: path - version: "0.9.2" + version: "0.9.3" serious_python_windows: dependency: transitive description: path: "../../../serious_python_windows" relative: true source: path - version: "0.9.2" + version: "0.9.3" shelf: dependency: transitive description: @@ -437,10 +437,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02 url: "https://pub.dev" source: hosted - version: "14.3.1" + version: "15.0.0" web: dependency: transitive description: @@ -453,10 +453,10 @@ packages: dependency: transitive description: name: webdriver - sha256: "3d773670966f02a646319410766d3b5e1037efb7f07cc68f844d5e06cd4d61c8" + sha256: "2f3a14ca026957870cfd9c635b83507e0e51d8091568e90129fbf805aba7cade" url: "https://pub.dev" source: hosted - version: "3.0.4" + version: "3.1.0" xdg_directories: dependency: transitive description: From 162c82c60f964a0700b47077109ff9dc02fda210 Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Fri, 22 Aug 2025 19:45:57 -0700 Subject: [PATCH 10/24] Remove --pre flag from test scripts in Appveyor config Eliminated the '--pre' flag from all 'dart run serious_python:main' commands in the .appveyor.yml file for multiple platforms. This streamlines the test scripts and may resolve issues related to pre-release package handling. --- .appveyor.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 5c7ed348..38b8e800 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -62,7 +62,7 @@ for: test_script: - export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages - cd src/serious_python/example/flet_example - - dart run serious_python:main package app/src -p Darwin -r flet -r --pre + - dart run serious_python:main package app/src -p Darwin -r flet -r - flutter test integration_test -d macos # ====================================== @@ -89,7 +89,7 @@ for: test_script: - export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages - cd src/serious_python/example/flet_example - - dart run serious_python:main package app/src -p iOS -r flet -r --pre + - dart run serious_python:main package app/src -p iOS -r flet -r - flutter build ios --no-codesign # - flutter drive --driver=test_driver/integration_test.dart --target=integration_test/app_test.dart @@ -125,7 +125,7 @@ for: test_script: - export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages - cd src/serious_python/example/flet_example - - dart run serious_python:main package app/src -p Android -r flet -r --pre + - dart run serious_python:main package app/src -p Android -r flet -r - flutter test integration_test -d emulator-5554 @@ -153,7 +153,7 @@ for: test_script: - set SERIOUS_PYTHON_SITE_PACKAGES=%APPVEYOR_BUILD_FOLDER%\site-packages - cd src/serious_python/example/flet_example - - dart run serious_python:main package app/src -p Windows -r flet -r --pre + - dart run serious_python:main package app/src -p Windows -r flet -r - flutter test integration_test -d windows # ====================================== @@ -174,7 +174,7 @@ for: test_script: - export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages - cd src/serious_python/example/flet_example - - dart run serious_python:main package app/src -p Linux -r flet -r --pre + - dart run serious_python:main package app/src -p Linux -r flet -r - xvfb-run flutter test integration_test -d linux # ====================================== @@ -199,7 +199,7 @@ for: test_script: - export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages - cd src/serious_python/example/flet_example - - dart run serious_python:main package app/src -p Linux -r flet -r --pre + - dart run serious_python:main package app/src -p Linux -r flet -r - xvfb-run flutter test integration_test -d linux # ========================================= From 211d3f12a4224cc55c6d680804cbc793774fbe11 Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Fri, 22 Aug 2025 20:01:56 -0700 Subject: [PATCH 11/24] Remove redundant '-r' flag from test scripts Cleaned up .appveyor.yml by removing duplicate '-r' flags from dart run commands in test_script sections for all platforms. This simplifies the test execution commands and avoids potential confusion. --- .appveyor.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 38b8e800..0ca6c2fd 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -62,7 +62,7 @@ for: test_script: - export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages - cd src/serious_python/example/flet_example - - dart run serious_python:main package app/src -p Darwin -r flet -r + - dart run serious_python:main package app/src -p Darwin -r flet - flutter test integration_test -d macos # ====================================== @@ -89,7 +89,7 @@ for: test_script: - export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages - cd src/serious_python/example/flet_example - - dart run serious_python:main package app/src -p iOS -r flet -r + - dart run serious_python:main package app/src -p iOS -r flet - flutter build ios --no-codesign # - flutter drive --driver=test_driver/integration_test.dart --target=integration_test/app_test.dart @@ -125,7 +125,7 @@ for: test_script: - export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages - cd src/serious_python/example/flet_example - - dart run serious_python:main package app/src -p Android -r flet -r + - dart run serious_python:main package app/src -p Android -r flet - flutter test integration_test -d emulator-5554 @@ -153,7 +153,7 @@ for: test_script: - set SERIOUS_PYTHON_SITE_PACKAGES=%APPVEYOR_BUILD_FOLDER%\site-packages - cd src/serious_python/example/flet_example - - dart run serious_python:main package app/src -p Windows -r flet -r + - dart run serious_python:main package app/src -p Windows -r flet - flutter test integration_test -d windows # ====================================== @@ -174,7 +174,7 @@ for: test_script: - export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages - cd src/serious_python/example/flet_example - - dart run serious_python:main package app/src -p Linux -r flet -r + - dart run serious_python:main package app/src -p Linux -r flet - xvfb-run flutter test integration_test -d linux # ====================================== @@ -199,7 +199,7 @@ for: test_script: - export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages - cd src/serious_python/example/flet_example - - dart run serious_python:main package app/src -p Linux -r flet -r + - dart run serious_python:main package app/src -p Linux -r flet - xvfb-run flutter test integration_test -d linux # ========================================= From f0f9709e2363a15c2f0e4a5ec4005ccd1a950463 Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Fri, 26 Sep 2025 11:09:22 -0700 Subject: [PATCH 12/24] Update Pyodide CDN URL to v0.28.3 Changed the pyodideRootUrl constant to use Pyodide version 0.28.3 instead of 0.27.2 for updated package support. --- src/serious_python/bin/package_command.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serious_python/bin/package_command.dart b/src/serious_python/bin/package_command.dart index bc10dd92..b2da0b37 100644 --- a/src/serious_python/bin/package_command.dart +++ b/src/serious_python/bin/package_command.dart @@ -15,7 +15,7 @@ import 'macos_utils.dart' as macos_utils; import 'sitecustomize.dart'; const mobilePyPiUrl = "https://pypi.flet.dev"; -const pyodideRootUrl = "https://cdn.jsdelivr.net/pyodide/v0.27.2/full"; +const pyodideRootUrl = "https://cdn.jsdelivr.net/pyodide/v0.28.3/full"; const pyodideLockFile = "pyodide-lock.json"; const buildPythonVersion = "3.12.9"; From 8e7b5b714072480d0c9e7d4d6aa93de0ffed14da Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Fri, 26 Sep 2025 11:12:26 -0700 Subject: [PATCH 13/24] Update Pyodide platform tag to 2025.0 Changed the Pyodide platform tag from 'pyodide-2024.0-wasm32' to 'pyodide-2025.0-wasm32' to reflect the new version. --- src/serious_python/bin/package_command.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serious_python/bin/package_command.dart b/src/serious_python/bin/package_command.dart index b2da0b37..41b54129 100644 --- a/src/serious_python/bin/package_command.dart +++ b/src/serious_python/bin/package_command.dart @@ -46,7 +46,7 @@ const platforms = { "x86": {"tag": "android-24-x86", "mac_ver": ""} }, "Pyodide": { - "": {"tag": "pyodide-2024.0-wasm32", "mac_ver": ""} + "": {"tag": "pyodide-2025.0-wasm32", "mac_ver": ""} }, "Darwin": { "arm64": {"tag": "", "mac_ver": "arm64"}, From 8dc7bafbf3af3b7288d2bc9c9e853ee26a572abd Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Fri, 26 Sep 2025 11:21:37 -0700 Subject: [PATCH 14/24] Revert "Update Pyodide platform tag to 2025.0" This reverts commit 8e7b5b714072480d0c9e7d4d6aa93de0ffed14da. --- src/serious_python/bin/package_command.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serious_python/bin/package_command.dart b/src/serious_python/bin/package_command.dart index 41b54129..b2da0b37 100644 --- a/src/serious_python/bin/package_command.dart +++ b/src/serious_python/bin/package_command.dart @@ -46,7 +46,7 @@ const platforms = { "x86": {"tag": "android-24-x86", "mac_ver": ""} }, "Pyodide": { - "": {"tag": "pyodide-2025.0-wasm32", "mac_ver": ""} + "": {"tag": "pyodide-2024.0-wasm32", "mac_ver": ""} }, "Darwin": { "arm64": {"tag": "", "mac_ver": "arm64"}, From 8b773ff053278bfd8868688ac729d79f4893ea91 Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Fri, 26 Sep 2025 11:22:02 -0700 Subject: [PATCH 15/24] Update Pyodide CDN URL to v0.27.7 Changed the pyodideRootUrl constant to point to Pyodide version 0.27.7 instead of 0.28.3 for compatibility or stability reasons. --- src/serious_python/bin/package_command.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serious_python/bin/package_command.dart b/src/serious_python/bin/package_command.dart index b2da0b37..f7596bb9 100644 --- a/src/serious_python/bin/package_command.dart +++ b/src/serious_python/bin/package_command.dart @@ -15,7 +15,7 @@ import 'macos_utils.dart' as macos_utils; import 'sitecustomize.dart'; const mobilePyPiUrl = "https://pypi.flet.dev"; -const pyodideRootUrl = "https://cdn.jsdelivr.net/pyodide/v0.28.3/full"; +const pyodideRootUrl = "https://cdn.jsdelivr.net/pyodide/v0.27.7/full"; const pyodideLockFile = "pyodide-lock.json"; const buildPythonVersion = "3.12.9"; From 2a031cd4ccbf600bd85c30606ba6ff9ea924f16a Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Sun, 5 Oct 2025 18:12:30 +0800 Subject: [PATCH 16/24] Update pubspec.yaml --- src/serious_python/pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/serious_python/pubspec.yaml b/src/serious_python/pubspec.yaml index 2684f173..9995d29a 100644 --- a/src/serious_python/pubspec.yaml +++ b/src/serious_python/pubspec.yaml @@ -44,7 +44,7 @@ dependencies: path: ../serious_python_linux path_provider: ^2.1.3 - archive: ^3.6.1 + archive: ^4.0.2 path: ^1.9.0 args: ^2.5.0 toml: ^0.15.0 @@ -57,4 +57,4 @@ dev_dependencies: flutter_test: sdk: flutter plugin_platform_interface: ^2.1.6 - flutter_lints: ^2.0.0 \ No newline at end of file + flutter_lints: ^2.0.0 From 9b96ad2e20da6e48ce237ed3b32877ad5b9deed0 Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Sun, 5 Oct 2025 18:14:22 +0800 Subject: [PATCH 17/24] Update pubspec.yaml --- src/serious_python_platform_interface/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serious_python_platform_interface/pubspec.yaml b/src/serious_python_platform_interface/pubspec.yaml index 8e892462..c3b1c120 100644 --- a/src/serious_python_platform_interface/pubspec.yaml +++ b/src/serious_python_platform_interface/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: sdk: flutter plugin_platform_interface: ^2.1.8 path_provider: ^2.1.3 - archive: ^3.6.1 + archive: ^4.0.2 path: ^1.9.0 dev_dependencies: From 0dd8c1ee7d32920fa4000d27223ec201e97a849d Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Sun, 5 Oct 2025 23:54:56 +0800 Subject: [PATCH 18/24] merge (#1) * Update pubspec.yaml * add try ... catch statement * update gradle version * update package`archive` * fix await method --- src/serious_python/bin/package_command.dart | 2 +- src/serious_python/example/flask_example/android/build.gradle | 2 +- src/serious_python/pubspec.yaml | 2 +- src/serious_python_android/android/build.gradle | 2 +- src/serious_python_platform_interface/pubspec.yaml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/serious_python/bin/package_command.dart b/src/serious_python/bin/package_command.dart index f7596bb9..514e54ca 100644 --- a/src/serious_python/bin/package_command.dart +++ b/src/serious_python/bin/package_command.dart @@ -433,7 +433,7 @@ class PackageCommand extends Command { stdout.writeln( "Creating app archive at ${dest.path} from a temp directory"); final encoder = ZipFileEncoder(); - encoder.zipDirectory(tempDir, filename: dest.path); + await encoder.zipDirectory(tempDir, filename: dest.path); // create hash file stdout.writeln("Writing app archive hash to ${dest.path}.hash"); diff --git a/src/serious_python/example/flask_example/android/build.gradle b/src/serious_python/example/flask_example/android/build.gradle index f7eb7f63..2001ec6e 100644 --- a/src/serious_python/example/flask_example/android/build.gradle +++ b/src/serious_python/example/flask_example/android/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.3.0' + classpath 'com.android.tools.build:gradle:9.1.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/src/serious_python/pubspec.yaml b/src/serious_python/pubspec.yaml index 9995d29a..6bca1b11 100644 --- a/src/serious_python/pubspec.yaml +++ b/src/serious_python/pubspec.yaml @@ -44,7 +44,7 @@ dependencies: path: ../serious_python_linux path_provider: ^2.1.3 - archive: ^4.0.2 + archive: ^4.0.7 path: ^1.9.0 args: ^2.5.0 toml: ^0.15.0 diff --git a/src/serious_python_android/android/build.gradle b/src/serious_python_android/android/build.gradle index 14284eb5..eb04b712 100644 --- a/src/serious_python_android/android/build.gradle +++ b/src/serious_python_android/android/build.gradle @@ -11,7 +11,7 @@ buildscript { dependencies { // The Android Gradle Plugin knows how to build native code with the NDK. - classpath 'com.android.tools.build:gradle:7.3.0' + classpath 'com.android.tools.build:gradle:9.1.0' classpath 'de.undercouch:gradle-download-task:4.1.2' } } diff --git a/src/serious_python_platform_interface/pubspec.yaml b/src/serious_python_platform_interface/pubspec.yaml index c3b1c120..75449323 100644 --- a/src/serious_python_platform_interface/pubspec.yaml +++ b/src/serious_python_platform_interface/pubspec.yaml @@ -13,7 +13,7 @@ dependencies: sdk: flutter plugin_platform_interface: ^2.1.8 path_provider: ^2.1.3 - archive: ^4.0.2 + archive: ^4.0.7 path: ^1.9.0 dev_dependencies: From ffc6be7b2d4e620c715d07517b273966a0727306 Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Mon, 6 Oct 2025 10:20:34 +0800 Subject: [PATCH 19/24] Merge (#2) * Update pubspec.yaml * add try ... catch statement * update gradle version * update package`archive` * fix await method * fix distributionUrl --- .../android/gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/serious_python/example/run_example/android/gradle/wrapper/gradle-wrapper.properties b/src/serious_python/example/run_example/android/gradle/wrapper/gradle-wrapper.properties index a10c8212..6f13bc89 100644 --- a/src/serious_python/example/run_example/android/gradle/wrapper/gradle-wrapper.properties +++ b/src/serious_python/example/run_example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip \ No newline at end of file +distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip \ No newline at end of file From a9f012d5e4b866eb8e298d818a04ed6e011aaf99 Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Mon, 6 Oct 2025 12:07:13 +0800 Subject: [PATCH 20/24] add gradle-wrapper.properties --- .../android/wrapper/gradle-wrapper.properties | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/serious_python_android/android/wrapper/gradle-wrapper.properties diff --git a/src/serious_python_android/android/wrapper/gradle-wrapper.properties b/src/serious_python_android/android/wrapper/gradle-wrapper.properties new file mode 100644 index 00000000..6f13bc89 --- /dev/null +++ b/src/serious_python_android/android/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip \ No newline at end of file From a37a84d9e39e6f6c138643921cca379ffe835376 Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Mon, 6 Oct 2025 12:35:50 +0800 Subject: [PATCH 21/24] revert --- .../example/flask_example/android/build.gradle | 2 +- .../android/gradle/wrapper/gradle-wrapper.properties | 5 ----- src/serious_python_android/android/build.gradle | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) delete mode 100644 src/serious_python/example/run_example/android/gradle/wrapper/gradle-wrapper.properties diff --git a/src/serious_python/example/flask_example/android/build.gradle b/src/serious_python/example/flask_example/android/build.gradle index 2001ec6e..f7eb7f63 100644 --- a/src/serious_python/example/flask_example/android/build.gradle +++ b/src/serious_python/example/flask_example/android/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:9.1.0' + classpath 'com.android.tools.build:gradle:7.3.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/src/serious_python/example/run_example/android/gradle/wrapper/gradle-wrapper.properties b/src/serious_python/example/run_example/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 6f13bc89..00000000 --- a/src/serious_python/example/run_example/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-bin.zip \ No newline at end of file diff --git a/src/serious_python_android/android/build.gradle b/src/serious_python_android/android/build.gradle index eb04b712..14284eb5 100644 --- a/src/serious_python_android/android/build.gradle +++ b/src/serious_python_android/android/build.gradle @@ -11,7 +11,7 @@ buildscript { dependencies { // The Android Gradle Plugin knows how to build native code with the NDK. - classpath 'com.android.tools.build:gradle:9.1.0' + classpath 'com.android.tools.build:gradle:7.3.0' classpath 'de.undercouch:gradle-download-task:4.1.2' } } From b7ba40253cef9eafda9a859572786c66585505c5 Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Mon, 6 Oct 2025 12:45:22 +0800 Subject: [PATCH 22/24] fix utils.dart --- src/serious_python_platform_interface/lib/src/utils.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/serious_python_platform_interface/lib/src/utils.dart b/src/serious_python_platform_interface/lib/src/utils.dart index e364c4e3..a45e7f34 100644 --- a/src/serious_python_platform_interface/lib/src/utils.dart +++ b/src/serious_python_platform_interface/lib/src/utils.dart @@ -60,9 +60,9 @@ Future extractAssetOrFile(String path, archive = ZipDecoder().decodeBytes(data); } else { final inputStream = InputFileStream(path); - archive = ZipDecoder().decodeBuffer(inputStream); + archive = ZipDecoder().decodeStream(inputStream); } - await extractArchiveToDiskAsync(archive, destDir.path, asyncWrite: true); + await extractArchiveToDisk(archive, destDir.path); } catch (e) { debugPrint("Error unpacking archive: $e"); await destDir.delete(recursive: true); From 2a73426a8016b26c469e5fc77b3cb5824c401348 Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Mon, 6 Oct 2025 14:50:34 +0800 Subject: [PATCH 23/24] add changelog & update version numbers --- src/serious_python/CHANGELOG.md | 4 ++++ .../example/flask_example/pubspec.lock | 12 ++++++------ src/serious_python/example/flet_example/pubspec.lock | 12 ++++++------ .../example/run_example/macos/Podfile.lock | 2 +- src/serious_python/example/run_example/pubspec.lock | 12 ++++++------ src/serious_python/pubspec.yaml | 2 +- src/serious_python_android/android/build.gradle | 2 +- src/serious_python_android/pubspec.yaml | 2 +- .../darwin/serious_python_darwin.podspec | 2 +- src/serious_python_darwin/pubspec.yaml | 2 +- src/serious_python_linux/pubspec.yaml | 2 +- src/serious_python_platform_interface/pubspec.yaml | 2 +- src/serious_python_windows/pubspec.yaml | 2 +- 13 files changed, 31 insertions(+), 27 deletions(-) diff --git a/src/serious_python/CHANGELOG.md b/src/serious_python/CHANGELOG.md index c6a429d9..3aad09c5 100644 --- a/src/serious_python/CHANGELOG.md +++ b/src/serious_python/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.4 +* Fix: Updated compileSdkVersion to pass Android builds +* Fix: The version of the dependency `archive` was increased to `4.0.7` and code changes were made for migration. + ## 0.9.3 * Fix: Hidden files in site-packages are skipped when building macOS app. diff --git a/src/serious_python/example/flask_example/pubspec.lock b/src/serious_python/example/flask_example/pubspec.lock index 260ed69f..d904cbc1 100644 --- a/src/serious_python/example/flask_example/pubspec.lock +++ b/src/serious_python/example/flask_example/pubspec.lock @@ -281,42 +281,42 @@ packages: path: "../.." relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_android: dependency: transitive description: path: "../../../serious_python_android" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_darwin: dependency: transitive description: path: "../../../serious_python_darwin" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_linux: dependency: transitive description: path: "../../../serious_python_linux" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_platform_interface: dependency: transitive description: path: "../../../serious_python_platform_interface" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_windows: dependency: transitive description: path: "../../../serious_python_windows" relative: true source: path - version: "0.9.3" + version: "0.9.4" shelf: dependency: transitive description: diff --git a/src/serious_python/example/flet_example/pubspec.lock b/src/serious_python/example/flet_example/pubspec.lock index 01e6f551..f00a80fd 100644 --- a/src/serious_python/example/flet_example/pubspec.lock +++ b/src/serious_python/example/flet_example/pubspec.lock @@ -554,42 +554,42 @@ packages: path: "../.." relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_android: dependency: transitive description: path: "../../../serious_python_android" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_darwin: dependency: transitive description: path: "../../../serious_python_darwin" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_linux: dependency: transitive description: path: "../../../serious_python_linux" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_platform_interface: dependency: transitive description: path: "../../../serious_python_platform_interface" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_windows: dependency: transitive description: path: "../../../serious_python_windows" relative: true source: path - version: "0.9.3" + version: "0.9.4" shared_preferences: dependency: transitive description: diff --git a/src/serious_python/example/run_example/macos/Podfile.lock b/src/serious_python/example/run_example/macos/Podfile.lock index 6ee684c8..1c7561a2 100644 --- a/src/serious_python/example/run_example/macos/Podfile.lock +++ b/src/serious_python/example/run_example/macos/Podfile.lock @@ -3,7 +3,7 @@ PODS: - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS - - serious_python_darwin (0.9.2): + - serious_python_darwin (0.9.4): - Flutter - FlutterMacOS diff --git a/src/serious_python/example/run_example/pubspec.lock b/src/serious_python/example/run_example/pubspec.lock index d614cac1..90710bb8 100644 --- a/src/serious_python/example/run_example/pubspec.lock +++ b/src/serious_python/example/run_example/pubspec.lock @@ -304,42 +304,42 @@ packages: path: "../.." relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_android: dependency: transitive description: path: "../../../serious_python_android" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_darwin: dependency: transitive description: path: "../../../serious_python_darwin" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_linux: dependency: transitive description: path: "../../../serious_python_linux" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_platform_interface: dependency: transitive description: path: "../../../serious_python_platform_interface" relative: true source: path - version: "0.9.3" + version: "0.9.4" serious_python_windows: dependency: transitive description: path: "../../../serious_python_windows" relative: true source: path - version: "0.9.3" + version: "0.9.4" shelf: dependency: transitive description: diff --git a/src/serious_python/pubspec.yaml b/src/serious_python/pubspec.yaml index 6bca1b11..14e555c6 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: 0.9.3 +version: 0.9.4 platforms: ios: diff --git a/src/serious_python_android/android/build.gradle b/src/serious_python_android/android/build.gradle index 14284eb5..c72c2dd5 100644 --- a/src/serious_python_android/android/build.gradle +++ b/src/serious_python_android/android/build.gradle @@ -1,5 +1,5 @@ group 'com.flet.serious_python_android' -version '0.9.3' +version '0.9.4' def python_version = '3.12' diff --git a/src/serious_python_android/pubspec.yaml b/src/serious_python_android/pubspec.yaml index e668e498..90adfe9c 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: 0.9.3 +version: 0.9.4 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/src/serious_python_darwin/darwin/serious_python_darwin.podspec b/src/serious_python_darwin/darwin/serious_python_darwin.podspec index c73af73d..05f0de51 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 = '0.9.3' + s.version = '0.9.4' 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 1afc3908..655f04c3 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: 0.9.3 +version: 0.9.4 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/src/serious_python_linux/pubspec.yaml b/src/serious_python_linux/pubspec.yaml index f26b2c20..b2b22e82 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: 0.9.3 +version: 0.9.4 environment: sdk: '>=3.1.3 <4.0.0' diff --git a/src/serious_python_platform_interface/pubspec.yaml b/src/serious_python_platform_interface/pubspec.yaml index 75449323..d75fe903 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: 0.9.3 +version: 0.9.4 environment: sdk: ">=3.0.0 <4.0.0" diff --git a/src/serious_python_windows/pubspec.yaml b/src/serious_python_windows/pubspec.yaml index 9042d100..823f9799 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: 0.9.3 +version: 0.9.4 environment: sdk: '>=3.1.3 <4.0.0' From 8fe6246467328bfcc8d0bb48ba916d6cdba4d421 Mon Sep 17 00:00:00 2001 From: Creeper19472 Date: Fri, 24 Oct 2025 20:06:47 +0800 Subject: [PATCH 24/24] Sync upstream (#4) * Fixes: Do not skip hidden files and `.dist-info` directories (#174) * Fix: hidden files in site-packages are skipped when building macOS app Fix https://github.com/flet-dev/flet/issues/5204#issuecomment-2793607490 * Fix tests * Fix tests, again * Remove .dist-info from junk files * Update changelogs to note .dist-info metadata fix Added a changelog entry for all platforms documenting the fix that prevents deletion of package metadata in `.dist-info` directories, addressing issue #164. * Bump Flutter to 3.35.1, fix package command * Set default assetPath if null in package command Assigns 'app/app.zip' as the default assetPath when none is provided, ensuring a valid path is always set. Also refactors the logic for handling leading slashes in assetPath. * Rollback Flet version * Remove hideLoadingPage from FletApp and update dependencies The hideLoadingPage property was removed from FletApp instantiations in main.dart to align with recent API changes. Updated pubspec.lock files for flask_example, flet_example, and run_example to reflect new package versions and dependency updates. * Remove --pre flag from test scripts in Appveyor config Eliminated the '--pre' flag from all 'dart run serious_python:main' commands in the .appveyor.yml file for multiple platforms. This streamlines the test scripts and may resolve issues related to pre-release package handling. * Remove redundant '-r' flag from test scripts Cleaned up .appveyor.yml by removing duplicate '-r' flags from dart run commands in test_script sections for all platforms. This simplifies the test execution commands and avoids potential confusion. * Update Pyodide CDN URL to v0.28.3 Changed the pyodideRootUrl constant to use Pyodide version 0.28.3 instead of 0.27.2 for updated package support. * Update Pyodide platform tag to 2025.0 Changed the Pyodide platform tag from 'pyodide-2024.0-wasm32' to 'pyodide-2025.0-wasm32' to reflect the new version. * Revert "Update Pyodide platform tag to 2025.0" This reverts commit 8e7b5b714072480d0c9e7d4d6aa93de0ffed14da. * Update Pyodide CDN URL to v0.27.7 Changed the pyodideRootUrl constant to point to Pyodide version 0.27.7 instead of 0.28.3 for compatibility or stability reasons. * 16 KB memory page support for Android 15+ (#176) * Add ELF 16KB alignment check script and CMake flags Introduces a comprehensive shell script to check ELF segment alignment for Android 16KB page size compatibility, addressing upcoming Google Play requirements. Updates CMakeLists.txt to set linker flags for 16KB page size support when building for Android, ensuring native libraries are compliant for Android 15+. * Bump version to 0.9.4 * Increase minSdkVersion to 21 in build.gradle Updated the Android project's minimum SDK version from 16 to 21 to ensure compatibility with newer APIs and libraries. * Migrate CI to GitHub Actions (#177) * initial commit * updates * updates * chore(ci): update CI configuration for concurrency and Flutter setup * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * updates * update * update * Add ELF 16KB alignment check script and CMake flags Introduces a comprehensive shell script to check ELF segment alignment for Android 16KB page size compatibility, addressing upcoming Google Play requirements. Updates CMakeLists.txt to set linker flags for 16KB page size support when building for Android, ensuring native libraries are compliant for Android 15+. * Bump version to 0.9.4 * Increase minSdkVersion to 21 in build.gradle Updated the Android project's minimum SDK version from 16 to 21 to ensure compatibility with newer APIs and libraries. * Switch flet dependency to Git source Changed the flet package source from a versioned release to a Git repository reference, pointing to the main branch of the official flet-dev/flet repository. This allows for using the latest code from the repository. * Remove --pre flag from serious_python packaging commands The --pre flag was removed from all dart run serious_python:main package commands in the CI workflow for all platforms. This change likely reflects an update in the packaging process or a move away from using pre-release features. * Update iOS CI workflow to run integration tests Replaces the iOS build step with a Flutter integration test run using the simulator's UDID. Adds a step to display the simulator UDID and ensures dependencies are fetched for Linux tests. * Update CI workflow: add uv setup and streamline steps Adds a step to set up uv using astral-sh/setup-uv, removes the explicit apt-get update, and consolidates the iOS build and test steps. Also removes the simulator UDID output step for a cleaner workflow. * Remove flutter devices step from CI workflow Eliminates the redundant 'flutter devices' command from the CI job for the Flet example, streamlining the workflow. * Remove --force flag from Dart publish step The --force flag was removed from the 'dart pub publish --dry-run' command in the CI workflow. This change ensures the publish step adheres to standard dry-run behavior without forcing publication. * Add caching for Android SDK in CI workflow Introduces a cache step for Android SDK components in the GitHub Actions CI workflow to improve build performance and reduce setup time. * Remove Android SDK cache step from CI workflow The step for caching the Android SDK directories has been removed from the GitHub Actions CI workflow. This may help avoid cache-related issues or reduce workflow complexity. * updates * ci: enhance Linux build configuration with architecture-specific dependencies * ci: update macOS and iOS jobs to use latest runner and improve test commands * ci: update version computation logic in CI workflow * ci: remove dry-run step from package publishing * ci: use environment variable for emulator port in CI workflow * update CI configuration for versioning and patching * Trying to fix publish job * Replace dry-run publish with dart analyze in CI In the CI workflow, the non-tagged branch step now runs 'dart analyze' instead of 'dart pub publish --dry-run' to perform static analysis rather than a dry-run publish. This improves code quality checks during CI for non-release branches. * Run 'dart pub get' before analysis in CI Adds 'dart pub get' to the CI workflow before running 'dart analyze' for non-tagged builds to ensure dependencies are installed prior to analysis. * sleep on publish only * Enable pub.dev steps only for version tags in CI Added conditional execution for pub.dev credential configuration and pubspec version patching steps to run only when the workflow is triggered by a version tag. This prevents these steps from running on non-release branches. * Exclude gen.dart from analyzer checks Added lib/src/gen.dart to the analyzer exclude list in analysis_options.yaml to prevent analysis of generated code. * Enable tag-based publishing in CI workflow Removes conditional checks and ensures publishing steps run only for tag refs starting with 'v'. Simplifies the publish_pkg function to always publish and adjusts sleep intervals between package publishes. * Enable CI jobs for all platforms Uncommented and activated CI jobs for macOS, iOS, Android, Windows, and Linux in the GitHub Actions workflow. The publish job now depends on successful completion of all platform tests, improving cross-platform coverage and release reliability. * Remove explicit shell specification from CI steps Eliminated redundant 'shell: bash' lines from multiple workflow steps in .github/workflows/ci.yml to simplify configuration and rely on default shell behavior. * Remove commented concurrency config from CI workflow Deleted unused, commented-out concurrency settings from the GitHub Actions CI workflow file to clean up configuration. * Remove download_artifact.py script Deleted the .github/scripts/download_artifact.py script, which handled downloading and extracting build artifacts from AppVeyor. This cleanup removes unused or obsolete CI utility code. * Add flutter pub get to CI test workflow Ensures Flutter dependencies are installed before running integration tests in the CI pipeline for the flet_example project. --------- Co-authored-by: ndonkoHenri * remove duplicate lines in pubspec.lock --------- Co-authored-by: Feodor Fitsner Co-authored-by: ndonkoHenri --- .appveyor.yml | 297 -------- .github/scripts/check_elf_alignment.sh | 699 ++++++++++++++++++ {ci => .github/scripts}/patch_pubspec.py | 6 +- .github/workflows/ci.yml | 296 ++++++++ ci/download_artifact.py | 51 -- ci/install_flutter.sh | 6 - src/serious_python/CHANGELOG.md | 2 + .../integration_test/app_test.dart | 2 +- src/serious_python_android/CHANGELOG.md | 4 + .../analysis_options.yaml | 4 + .../android/build.gradle | 2 +- src/serious_python_android/src/CMakeLists.txt | 7 + src/serious_python_darwin/CHANGELOG.md | 4 + src/serious_python_linux/CHANGELOG.md | 4 + .../CHANGELOG.md | 4 + src/serious_python_windows/CHANGELOG.md | 4 + 16 files changed, 1035 insertions(+), 357 deletions(-) delete mode 100644 .appveyor.yml create mode 100755 .github/scripts/check_elf_alignment.sh rename {ci => .github/scripts}/patch_pubspec.py (91%) create mode 100644 .github/workflows/ci.yml delete mode 100644 ci/download_artifact.py delete mode 100755 ci/install_flutter.sh diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 0ca6c2fd..00000000 --- a/.appveyor.yml +++ /dev/null @@ -1,297 +0,0 @@ -skip_branch_with_pr: true - -environment: - FLUTTER_VERSION: 3.29.3 - GITHUB_TOKEN: - secure: 9SKIwc3VSfYJ5IChvNR74mEv2nb0ZFftUzn3sGRdXipXEfKSxY50DoodChHvlqZduQNhjg0oyLWAAa3n+iwWvVM2yI7Cgb14lFNClijz/kHI/PibnjDMNvLKaAygcfAc - - matrix: - - job_name: Test on macOS - job_group: test_serious_python - job_depends_on: build_python_darwin - APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey - - - job_name: Test on iOS - job_group: test_serious_python - job_depends_on: build_python_darwin - APPVEYOR_BUILD_WORKER_IMAGE: macos-ventura - - - job_name: Test on Android - job_group: test_serious_python - job_depends_on: build_python_android - APPVEYOR_BUILD_WORKER_IMAGE: ubuntu-gce-c - - - job_name: Test on Windows - job_group: test_serious_python - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 - - - job_name: Test on Linux - job_group: test_serious_python - APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2004 - - - job_name: Test on Linux ARM64 - job_group: test_serious_python - APPVEYOR_BUILD_WORKER_IMAGE: ubuntu2204-arm - - - job_name: Publish serious_python package to pub.dev - job_group: publish_package - job_depends_on: build_python, test_serious_python - APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu2004 - -stack: -- python 3.12 - -for: - # ====================================== - # Test on macOS - # ====================================== - - - matrix: - only: - - job_name: Test on macOS - - install: - - HOMEBREW_NO_AUTO_UPDATE=1 brew install cocoapods - - source ci/install_flutter.sh - - flutter config --enable-macos-desktop - - flutter doctor -v - - xcodebuild -version - - build: off - - test_script: - - export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages - - cd src/serious_python/example/flet_example - - dart run serious_python:main package app/src -p Darwin -r flet - - flutter test integration_test -d macos - - # ====================================== - # Test on iOS - # ====================================== - - - matrix: - only: - - job_name: Test on iOS - - install: - - HOMEBREW_NO_AUTO_UPDATE=1 brew install cocoapods - - source ci/install_flutter.sh - # - xcrun simctl list runtimes - # - xcrun simctl create "e2e test" "iPhone 12" "com.apple.CoreSimulator.SimRuntime.iOS-17-2" - # - xcrun xctrace list devices - # - | - # UDID=$(xcrun xctrace list devices | grep "^e2e test Simulator (17.2)" | awk '{gsub(/[()]/,""); print $NF}') - # echo $UDID - # xcrun simctl boot "${UDID:?No Simulator with this name found}" - - build: off - - test_script: - - export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages - - cd src/serious_python/example/flet_example - - dart run serious_python:main package app/src -p iOS -r flet - - flutter build ios --no-codesign - # - flutter drive --driver=test_driver/integration_test.dart --target=integration_test/app_test.dart - - # ====================================== - # Test on Android - # ====================================== - - - matrix: - only: - - job_name: Test on Android - - install: - - API_LEVEL="33" - - TARGET="google_atd" - - ARCH="x86_64" - - DEVICE_NAME="android_emulator" - - DEVICE_TYPE="pixel_5" - - 'export PATH=$ANDROID_SDK_ROOT/platform-tools:$ANDROID_SDK_ROOT/emulator:$PATH' - - sdkmanager "platform-tools" "platforms;android-${API_LEVEL}" - - sdkmanager --install "system-images;android-${API_LEVEL};${TARGET};${ARCH}" - - sdkmanager --update - - echo "y" | sdkmanager --licenses - - echo "no" | avdmanager -v create avd --force --name "${DEVICE_NAME}" --package "system-images;android-${API_LEVEL};${TARGET};${ARCH}" --tag "${TARGET}" --sdcard 128M --device "${DEVICE_TYPE}" - - ls -al ~/.android/avd - - sudo adduser $USER kvm - - sudo chown $USER /dev/kvm - - emulator -avd "${DEVICE_NAME}" -memory 2048 -wipe-data -no-boot-anim -cache-size 1000 -noaudio -no-window -partition-size 8192 & - - adb wait-for-device shell 'while [[ -z $(getprop dev.bootcomplete) ]]; do sleep 1; done;' - - source ci/install_flutter.sh - - build: off - - test_script: - - export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages - - cd src/serious_python/example/flet_example - - dart run serious_python:main package app/src -p Android -r flet - - flutter test integration_test -d emulator-5554 - - - # ====================================== - # Test on Windows - # ====================================== - - - matrix: - only: - - job_name: Test on Windows - - #environment: - # VC_REDIST_DIR: 'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Redist\MSVC\14.29.30133\x64\Microsoft.VC142.CRT' - - install: - - dart pub global activate fvm - - set PATH=%LOCALAPPDATA%\Pub\Cache\bin;%USERPROFILE%\fvm\default\bin;%PATH% - - fvm install %FLUTTER_VERSION% - - fvm global %FLUTTER_VERSION% - - flutter --version - - flutter doctor - - build: off - - test_script: - - set SERIOUS_PYTHON_SITE_PACKAGES=%APPVEYOR_BUILD_FOLDER%\site-packages - - cd src/serious_python/example/flet_example - - dart run serious_python:main package app/src -p Windows -r flet - - flutter test integration_test -d windows - - # ====================================== - # Test on Linux - # ====================================== - - - matrix: - only: - - job_name: Test on Linux - - install: - - sudo apt update --allow-releaseinfo-change - - sudo apt install -y xvfb libgtk-3-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio - - source ci/install_flutter.sh - - build: off - - test_script: - - export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages - - cd src/serious_python/example/flet_example - - dart run serious_python:main package app/src -p Linux -r flet - - xvfb-run flutter test integration_test -d linux - - # ====================================== - # Test on Linux ARM64 - # ====================================== - - - matrix: - only: - - job_name: Test on Linux ARM64 - - install: - # Flutter SDK - - sudo sed -i "/#\$nrconf{restart} = 'i';/s/.*/\$nrconf{restart} = 'a';/" /etc/needrestart/needrestart.conf - - sudo apt update -y --allow-releaseinfo-change - - sudo apt install -y clang ninja-build xvfb libgtk-3-dev gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav - - git clone https://github.com/flutter/flutter.git -b stable "$HOME/flutter" - - export PATH="$PATH:$HOME/flutter/bin" - - source ci/install_flutter.sh - - build: off - - test_script: - - export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages - - cd src/serious_python/example/flet_example - - dart run serious_python:main package app/src -p Linux -r flet - - xvfb-run flutter test integration_test -d linux - - # ========================================= - # Publish serious_python package to pub.dev - # ========================================= - - - matrix: - only: - - job_name: Publish serious_python package to pub.dev - - install: - # update build version - - ps: | - if ($env:APPVEYOR_REPO_TAG_NAME) { - $env:PKG_VER = $env:APPVEYOR_REPO_TAG_NAME.replace("v", "") - } else { - $cv = [version](git describe --abbrev=0).substring(1) - $env:PKG_VER = "$($cv.major).$($cv.minor).$($env:APPVEYOR_BUILD_NUMBER)" - } - Write-Host "Package version: $($env:PKG_VER)" - - - pip3 install pyyaml - - flutter upgrade --force - - build_script: - # publish package - - sh: | - if [[ "$APPVEYOR_REPO_TAG_NAME" != "" ]]; then - mkdir -p $HOME/.config/dart - echo $PUB_DEV_TOKEN | base64 --decode > $HOME/.config/dart/pub-credentials.json - - # patch pubspecs - python3 ci/patch_pubspec.py src/serious_python_platform_interface/pubspec.yaml $PKG_VER - python3 ci/patch_pubspec.py src/serious_python/pubspec.yaml $PKG_VER - python3 ci/patch_pubspec.py src/serious_python_android/pubspec.yaml $PKG_VER - python3 ci/patch_pubspec.py src/serious_python_darwin/pubspec.yaml $PKG_VER - python3 ci/patch_pubspec.py src/serious_python_windows/pubspec.yaml $PKG_VER - python3 ci/patch_pubspec.py src/serious_python_linux/pubspec.yaml $PKG_VER - - cd src/serious_python_platform_interface - dart pub publish --force - cd $APPVEYOR_BUILD_FOLDER - - sleep 600 - - cd src/serious_python_android - dart pub publish --force - cd $APPVEYOR_BUILD_FOLDER - - cd src/serious_python_darwin - dart pub publish --force - cd $APPVEYOR_BUILD_FOLDER - - cd src/serious_python_windows - dart pub publish --force - cd $APPVEYOR_BUILD_FOLDER - - cd src/serious_python_linux - dart pub publish --force - cd $APPVEYOR_BUILD_FOLDER - - sleep 600 - - cd src/serious_python - dart pub publish --force || exit 1 - cd $APPVEYOR_BUILD_FOLDER - - elif [[ "$APPVEYOR_PULL_REQUEST_NUMBER" == "" ]]; then - - cd src/serious_python_platform_interface - dart pub publish --dry-run - cd $APPVEYOR_BUILD_FOLDER - - cd src/serious_python_android - dart pub publish --dry-run - cd $APPVEYOR_BUILD_FOLDER - - cd src/serious_python_darwin - dart pub publish --dry-run - cd $APPVEYOR_BUILD_FOLDER - - cd src/serious_python_windows - dart pub publish --dry-run - cd $APPVEYOR_BUILD_FOLDER - - cd src/serious_python_linux - dart pub publish --dry-run - cd $APPVEYOR_BUILD_FOLDER - - cd src/serious_python - dart pub publish --dry-run - cd $APPVEYOR_BUILD_FOLDER - fi - - test: off \ No newline at end of file diff --git a/.github/scripts/check_elf_alignment.sh b/.github/scripts/check_elf_alignment.sh new file mode 100755 index 00000000..d8db1291 --- /dev/null +++ b/.github/scripts/check_elf_alignment.sh @@ -0,0 +1,699 @@ +#!/bin/bash + +# Enhanced ELF Alignment Checker for Android 16KB Page Size Compatibility +# This script checks if your app's native libraries are compatible with 16KB page size devices +# as required by Google Play starting November 1st, 2025 for apps targeting Android 15+ + +progname="${0##*/}" +progname="${progname%.sh}" + +# Color codes and formatting - detect if colors are supported +if [[ -t 1 ]] && command -v tput >/dev/null 2>&1 && tput colors >/dev/null 2>&1 && [[ $(tput colors) -ge 8 ]]; then + RED="\033[31m" + GREEN="\033[32m" + YELLOW="\033[33m" + BLUE="\033[34m" + CYAN="\033[36m" + PURPLE="\033[35m" + BOLD="\033[1m" + DIM="\033[2m" + ENDCOLOR="\033[0m" + USE_COLORS=true +else + # No color support - use plain text + RED="" + GREEN="" + YELLOW="" + BLUE="" + CYAN="" + PURPLE="" + BOLD="" + DIM="" + ENDCOLOR="" + USE_COLORS=false +fi + +# Unicode symbols with fallbacks +if [[ $USE_COLORS == true ]]; then + CHECK_MARK="āœ“" + CROSS_MARK="āœ—" + WARNING_MARK="⚠" + INFO_MARK="ℹ" + ROCKET="šŸš€" + GEAR="āš™" + PACKAGE="šŸ“¦" + DOCUMENT="šŸ“„" + ALERT="🚨" + PARTY="šŸŽ‰" + TOOLS="šŸ”§" + BOOKS="šŸ“š" + ARROW="ā–¶" +else + CHECK_MARK="[OK]" + CROSS_MARK="[X]" + WARNING_MARK="[!]" + INFO_MARK="[i]" + ROCKET="[>]" + GEAR="[*]" + PACKAGE="[P]" + DOCUMENT="[D]" + ALERT="[!]" + PARTY="[*]" + TOOLS="[T]" + BOOKS="[B]" + ARROW=">" +fi + +# Enhanced formatting functions +print_banner() { + local title="$1" + local subtitle="$2" + local width=88 + + echo + printf "%*s\n" $width | tr ' ' '═' + + # Main title + local title_len=${#title} + local title_padding=$(( (width - title_len - 4) / 2 )) + printf "ā•‘${BOLD}${BLUE}%*s %s %*s${ENDCOLOR}ā•‘\n" \ + $title_padding "" "$title" $title_padding "" + + # Subtitle if provided + if [[ -n "$subtitle" ]]; then + local subtitle_len=${#subtitle} + local subtitle_padding=$(( (width - subtitle_len - 4) / 2 )) + printf "ā•‘${DIM}%*s %s %*s${ENDCOLOR}ā•‘\n" \ + $subtitle_padding "" "$subtitle" $subtitle_padding "" + fi + + printf "%*s\n" $width | tr ' ' '═' + echo +} + +print_section() { + local icon="$1" + local title="$2" + local description="$3" + + echo + echo -e "${BOLD}${BLUE}$icon $title${ENDCOLOR}" + if [[ -n "$description" ]]; then + echo -e "${DIM}$description${ENDCOLOR}" + fi + printf "${BLUE}%*s${ENDCOLOR}\n" 80 | tr ' ' '─' +} + +print_status() { + local status="$1" + local message="$2" + local detail="$3" + + case $status in + "success") + printf " ${GREEN}${CHECK_MARK}${ENDCOLOR} %s" "$message" + ;; + "error") + printf " ${RED}${CROSS_MARK}${ENDCOLOR} %s" "$message" + ;; + "warning") + printf " ${YELLOW}${WARNING_MARK}${ENDCOLOR} %s" "$message" + ;; + "info") + printf " ${CYAN}${INFO_MARK}${ENDCOLOR} %s" "$message" + ;; + "processing") + printf " ${PURPLE}${GEAR}${ENDCOLOR} %s" "$message" + ;; + esac + + if [[ -n "$detail" ]]; then + printf "\n ${DIM}%s${ENDCOLOR}" "$detail" + fi + echo +} + +print_subsection() { + local title="$1" + echo + echo -e " ${BOLD}${PURPLE}${ARROW} $title${ENDCOLOR}" + printf " ${PURPLE}%*s${ENDCOLOR}\n" 50 | tr ' ' 'ā”ˆ' +} + +print_table_header() { + echo + local line1="ā”Œ$(printf '─%.0s' {1..29})┬$(printf '─%.0s' {1..18})┬$(printf '─%.0s' {1..15})┬$(printf '─%.0s' {1..13})┐" + local line2="│ $(printf '%-27s' 'Library') │ $(printf '%-16s' 'Architecture') │ $(printf '%-13s' 'Alignment') │ $(printf '%-11s' 'Status') │" + local line3="ā”œ$(printf '─%.0s' {1..29})┼$(printf '─%.0s' {1..18})┼$(printf '─%.0s' {1..15})┼$(printf '─%.0s' {1..13})┤" + + echo -e "${CYAN}$line1${ENDCOLOR}" + echo -e "${BOLD}${CYAN}$line2${ENDCOLOR}" + echo -e "${CYAN}$line3${ENDCOLOR}" +} + +print_table_row() { + local lib="$1" + local arch="$2" + local alignment="$3" + local status="$4" + local is_critical="$5" + + local status_symbol + local status_color + local status_text + + if [[ $status == "ALIGNED" ]]; then + status_symbol="$CHECK_MARK" + status_color="$GREEN" + status_text="PASS" + else + status_symbol="$CROSS_MARK" + if [[ $is_critical == "true" ]]; then + status_color="$RED" + status_text="FAIL" + else + status_color="$YELLOW" + status_text="WARN" + fi + fi + + # Truncate library name if too long + local display_lib="$lib" + if [[ ${#lib} -gt 27 ]]; then + display_lib="${lib:0:24}..." + fi + + printf "${CYAN}│${ENDCOLOR} %-27s ${CYAN}│${ENDCOLOR} %-16s ${CYAN}│${ENDCOLOR} %-13s ${CYAN}│${ENDCOLOR} ${status_color}%s %-7s${ENDCOLOR} ${CYAN}│${ENDCOLOR}\n" \ + "$display_lib" "$arch" "$alignment" "$status_symbol" "$status_text" + + if [[ $is_critical == "true" && $status == "UNALIGNED" ]]; then + printf "${CYAN}│${ENDCOLOR} ${RED}%-75s${ENDCOLOR} ${CYAN}│${ENDCOLOR}\n" " ${ALERT} CRITICAL: Required for Google Play compliance!" + fi +} + +print_table_footer() { + local line="ā””$(printf '─%.0s' {1..29})┓$(printf '─%.0s' {1..18})┓$(printf '─%.0s' {1..15})┓$(printf '─%.0s' {1..13})ā”˜" + echo -e "${CYAN}$line${ENDCOLOR}" + echo +} + +print_summary_box() { + local title="$1" + local status="$2" # success, warning, error + shift 2 + local lines=("$@") + + local box_color + local title_color + case $status in + "success") box_color="$GREEN"; title_color="$GREEN" ;; + "warning") box_color="$YELLOW"; title_color="$YELLOW" ;; + "error") box_color="$RED"; title_color="$RED" ;; + *) box_color="$BLUE"; title_color="$BLUE" ;; + esac + + local width=78 + echo + printf "${box_color}ā”Œ%*s┐${ENDCOLOR}\n" $((width-2)) | tr ' ' '─' + + # Title + local title_len=${#title} + local title_padding=$(( (width - title_len - 4) / 2 )) + printf "${box_color}│${ENDCOLOR}${BOLD}${title_color}%*s %s %*s${ENDCOLOR}${box_color}│${ENDCOLOR}\n" \ + $title_padding "" "$title" $title_padding "" + + printf "${box_color}ā”œ%*s┤${ENDCOLOR}\n" $((width-2)) | tr ' ' '─' + + # Content lines + for line in "${lines[@]}"; do + printf "${box_color}│${ENDCOLOR} %-*s ${box_color}│${ENDCOLOR}\n" $((width-4)) "$line" + done + + printf "${box_color}ā””%*sā”˜${ENDCOLOR}\n" $((width-2)) | tr ' ' '─' + echo +} + +cleanup_trap() { + if [ -n "${tmp}" -a -d "${tmp}" ]; then + print_status "processing" "Cleaning up temporary files..." + rm -rf "${tmp}" + fi + exit $1 +} + +usage() { + print_banner "Android 16KB Page Size Compatibility Checker" "Google Play Compliance Tool" + + echo -e "${BOLD}DESCRIPTION:${ENDCOLOR}" + echo " This tool verifies that your Android app's native libraries are compatible" + echo " with 16KB page size devices, as required by Google Play starting November 1st, 2025." + echo + + echo -e "${BOLD}USAGE:${ENDCOLOR}" + echo -e " ${GREEN}$progname${ENDCOLOR} ${CYAN}[input-path|input-APK|input-APEX]${ENDCOLOR}" + echo + + echo -e "${BOLD}EXAMPLES:${ENDCOLOR}" + echo -e " ${DIM}# Check an APK file${ENDCOLOR}" + echo -e " $progname ${CYAN}app/build/outputs/apk/release/app-release.apk${ENDCOLOR}" + echo + echo -e " ${DIM}# Check a directory of native libraries${ENDCOLOR}" + echo -e " $progname ${CYAN}/path/to/native/libs/${ENDCOLOR}" + echo + + echo -e "${BOLD}WHAT THIS TOOL CHECKS:${ENDCOLOR}" + echo -e " ${CHECK_MARK} APK zip-alignment for 16KB boundaries (requires build-tools 35.0.0+)" + echo -e " ${CHECK_MARK} ELF segment alignment in native libraries (arm64-v8a and x86_64)" + echo -e " ${CHECK_MARK} Compliance with Android 16KB page size requirements" + echo + + echo -e "${BOLD}RESULT MEANINGS:${ENDCOLOR}" + echo -e " ${GREEN}${CHECK_MARK} PASS${ENDCOLOR} - Library is compatible with 16KB page sizes (2**14 or higher)" + echo -e " ${RED}${CROSS_MARK} FAIL${ENDCOLOR} - Library needs recompilation with 16KB ELF alignment" + echo -e " ${YELLOW}${WARNING_MARK} WARN${ENDCOLOR} - Non-critical architecture but should be fixed" + echo +} + +# Enhanced dependency checking +check_dependencies() { + print_section "$GEAR" "Dependency Check" "Verifying required tools are available" + + local missing_tools=() + local available_tools=() + + # Check each tool + local tools=("objdump" "unzip" "file") + for tool in "${tools[@]}"; do + if command -v "$tool" >/dev/null 2>&1; then + available_tools+=("$tool") + print_status "success" "$tool" "$(which "$tool")" + else + missing_tools+=("$tool") + print_status "error" "$tool not found" + fi + done + + if [ ${#missing_tools[@]} -gt 0 ]; then + echo + print_subsection "Installation Instructions" + for tool in "${missing_tools[@]}"; do + case $tool in + objdump) + print_status "info" "Install objdump:" "macOS: Xcode Command Line Tools or Android NDK's llvm-objdump" + print_status "info" "" "Linux: sudo apt-get install binutils (Ubuntu/Debian)" + ;; + unzip) + print_status "info" "Install unzip:" "Usually pre-installed on most systems" + print_status "info" "" "Linux: sudo apt-get install unzip" + ;; + file) + print_status "info" "Install file:" "Usually pre-installed on most systems" + print_status "info" "" "Linux: sudo apt-get install file" + ;; + esac + echo + done + exit 1 + fi + + print_status "success" "All dependencies satisfied" "${#available_tools[@]} tools available" +} + +# Validate input arguments +if [ ${#} -ne 1 ]; then + usage + exit 1 +fi + +case ${1} in + --help | -h | -\?) + usage + exit 0 + ;; + *) + dir="${1}" + ;; +esac + +# Validate input file/directory +if ! [ -f "${dir}" -o -d "${dir}" ]; then + print_status "error" "Invalid input: ${dir}" + echo " Please provide a valid APK file, APEX file, or directory containing native libraries." + exit 1 +fi + +# Check dependencies before proceeding +check_dependencies + +print_banner "ANALYSIS IN PROGRESS" "Checking 16KB Page Size Compatibility" + +print_status "processing" "Target: $(basename "${dir}")" +print_status "info" "Compliance Deadline: November 1st, 2025" +print_status "info" "Requirement: Apps targeting Android 15+ must support 16KB pages" + +# APK Processing +if [[ "${dir}" == *.apk ]]; then + trap 'cleanup_trap' EXIT + + print_section "$PACKAGE" "APK Analysis" "Processing Android Package file" + + # Enhanced zipalign check + if command -v zipalign >/dev/null 2>&1; then + if { zipalign --help 2>&1 | grep -q "\-P "; }; then + print_status "processing" "Checking APK zip-alignment for 16KB boundaries..." + + zip_result=$(zipalign -v -c -P 16 4 "${dir}" 2>&1) + zip_exit_code=$? + + if [ $zip_exit_code -eq 0 ]; then + print_status "success" "APK zip-alignment verification passed" + else + print_status "error" "APK zip-alignment verification failed" + echo " ${DIM}Details:${ENDCOLOR}" + echo "$zip_result" | grep -E 'lib/arm64-v8a|lib/x86_64|Verification|would be' | sed 's/^/ /' || echo " $zip_result" + fi + else + print_status "warning" "zipalign version doesn't support 16KB alignment checks" + print_status "info" "Solution: Update to Android SDK build-tools 35.0.0+" + echo " ${DIM}Update via Android Studio → SDK Manager → SDK Tools${ENDCOLOR}" + echo " ${DIM}Or run: sdkmanager \"build-tools;35.0.0\"${ENDCOLOR}" + fi + else + print_status "warning" "zipalign not found in PATH" + print_status "info" "Ensure Android SDK build-tools are installed and in PATH" + fi + + # Extract APK + dir_filename=$(basename "${dir}") + tmp=$(mktemp -d -t "${dir_filename%.apk}_out_XXXXX") + + if [ ! -d "${tmp}" ]; then + print_status "error" "Failed to create temporary directory" + exit 1 + fi + + print_status "processing" "Extracting native libraries from APK..." + if ! unzip -q "${dir}" "lib/*" -d "${tmp}" 2>/dev/null; then + print_summary_box "NO NATIVE LIBRARIES FOUND" "success" \ + "${PARTY} Your app contains only Java/Kotlin code!" \ + "" \ + "${CHECK_MARK} Apps without native libraries automatically support 16KB devices" \ + "${CHECK_MARK} No additional changes required for Google Play compliance" \ + "${CHECK_MARK} You're all set for the November 1st, 2025 deadline!" + cleanup_trap 0 + fi + + dir="${tmp}" +fi + +# APEX Processing +if [[ "${dir}" == *.apex ]]; then + trap 'cleanup_trap' EXIT + + print_section "$DOCUMENT" "APEX Analysis" "Processing Android Pony EXpress file" + + if ! command -v deapexer >/dev/null 2>&1; then + print_status "error" "deapexer tool not found" + echo " Please ensure Android SDK tools are properly installed and in your PATH." + exit 1 + fi + + dir_filename=$(basename "${dir}") + tmp=$(mktemp -d -t "${dir_filename%.apex}_out_XXXXX") + + if [ ! -d "${tmp}" ]; then + print_status "error" "Failed to create temporary directory" + exit 1 + fi + + print_status "processing" "Extracting APEX contents..." + if ! deapexer extract "${dir}" "${tmp}"; then + print_status "error" "Failed to extract APEX file" + cleanup_trap 1 + fi + + dir="${tmp}" +fi + +# Track libraries for enhanced summary +unaligned_libs=() +aligned_libs=() +critical_unaligned_libs=() +non_critical_unaligned_libs=() +total_libs=0 +critical_libs=0 + +print_section "$GEAR" "ELF Segment Analysis" "Scanning native libraries for 16KB alignment compliance" + +# Find all native libraries +matches="$(find "${dir}" -type f -name '*.so' 2>/dev/null)" +if [ -z "$matches" ]; then + # Also check for ELF files without .so extension + matches="$(find "${dir}" -type f -exec file {} \; 2>/dev/null | grep 'ELF' | cut -d: -f1)" +fi + +if [ -z "$matches" ]; then + print_summary_box "NO NATIVE LIBRARIES DETECTED" "success" \ + "${PARTY} Your app uses only Java/Kotlin code!" \ + "" \ + "${CHECK_MARK} No native library alignment issues to worry about" \ + "${CHECK_MARK} Already compatible with 16KB page size devices" \ + "${CHECK_MARK} Ready for Google Play's November 1st, 2025 requirement!" + cleanup_trap 0 +fi + +print_status "info" "Found native libraries - analyzing ELF segment alignment..." + +print_table_header + +IFS=$'\n' +for match in $matches; do + # Skip non-ELF files and nested packages + if [[ "${match}" == *".apk" ]]; then + continue + fi + if [[ "${match}" == *".apex" ]]; then + continue + fi + + # Verify it's actually an ELF file + if ! [[ $(file "${match}" 2>/dev/null) == *"ELF"* ]]; then + continue + fi + + total_libs=$((total_libs + 1)) + + # Determine architecture and criticality + arch="unknown" + is_critical="false" + if [[ "${match}" == *"arm64-v8a"* ]]; then + arch="arm64-v8a" + is_critical="true" + critical_libs=$((critical_libs + 1)) + elif [[ "${match}" == *"x86_64"* ]]; then + arch="x86_64" + is_critical="true" + critical_libs=$((critical_libs + 1)) + elif [[ "${match}" == *"armeabi-v7a"* ]]; then + arch="armeabi-v7a" + elif [[ "${match}" == *"x86"* ]]; then + arch="x86" + fi + + # Check ELF segment alignment + res="$(objdump -p "${match}" 2>/dev/null | grep LOAD | awk '{ print $NF }' | head -1)" + + if [ -z "$res" ]; then + print_table_row "$(basename "${match}")" "$arch" "UNKNOWN" "FAILED" "$is_critical" + continue + fi + + # Check if alignment meets 16KB requirement (2**14 or higher) + if [[ $res =~ 2\*\*(1[4-9]|[2-9][0-9]|[1-9][0-9]{2,}) ]]; then + print_table_row "$(basename "${match}")" "$arch" "$res" "ALIGNED" "$is_critical" + aligned_libs+=("${match}") + else + print_table_row "$(basename "${match}")" "$arch" "$res" "UNALIGNED" "$is_critical" + unaligned_libs+=("${match}") + + if [[ "$is_critical" == "true" ]]; then + critical_unaligned_libs+=("${match}") + else + non_critical_unaligned_libs+=("${match}") + fi + fi +done + +print_table_footer + +# Enhanced Summary Section +if [ ${#unaligned_libs[@]} -gt 0 ]; then + # Failure case - unaligned libraries found + summary_lines=( + "${ALERT} ACTION REQUIRED: Unaligned native libraries detected!" + "" + "Analysis Results:" + " • Total libraries scanned: $total_libs" + " • Critical architectures (64-bit): $critical_libs" + " • Libraries aligned: ${#aligned_libs[@]}" + " • Libraries UNALIGNED: ${#unaligned_libs[@]}" + ) + + if [ ${#critical_unaligned_libs[@]} -gt 0 ]; then + summary_lines+=(" • Critical failures: ${#critical_unaligned_libs[@]} (MUST FIX)") + fi + + if [ ${#non_critical_unaligned_libs[@]} -gt 0 ]; then + summary_lines+=(" • Non-critical warnings: ${#non_critical_unaligned_libs[@]} (SHOULD FIX)") + fi + + summary_lines+=("") + summary_lines+=("Google Play Compliance: FAILED") + summary_lines+=("Deadline: November 1st, 2025") + + print_summary_box "COMPATIBILITY CHECK FAILED" "error" "${summary_lines[@]}" + + # Detailed library breakdown + if [ ${#critical_unaligned_libs[@]} -gt 0 ]; then + print_subsection "Critical Libraries Requiring Immediate Attention" + for lib in "${critical_unaligned_libs[@]}"; do + arch_type="64-bit" + [[ "${lib}" == *"arm64-v8a"* ]] && arch_type="ARM64" + [[ "${lib}" == *"x86_64"* ]] && arch_type="x86_64" + print_status "error" "$(basename "$lib")" "$arch_type architecture - Required for Google Play" + done + fi + + if [ ${#non_critical_unaligned_libs[@]} -gt 0 ]; then + print_subsection "Non-Critical Libraries (Recommended to Fix)" + for lib in "${non_critical_unaligned_libs[@]}"; do + arch_type="32-bit" + [[ "${lib}" == *"armeabi-v7a"* ]] && arch_type="ARMv7" + [[ "${lib}" == *"x86"* ]] && arch_type="x86" + print_status "warning" "$(basename "$lib")" "$arch_type architecture" + done + fi + + # Comprehensive fix instructions + print_section "$TOOLS" "How to Fix Unaligned Libraries" "Step-by-step guide to achieve 16KB compatibility" + + print_subsection "Step 1: Update Your Build Environment" + print_status "info" "Android Gradle Plugin (AGP)" "Upgrade to version 8.5.1 or higher" + print_status "info" "Android NDK" "Update to NDK r27 or higher (r28+ recommended)" + print_status "info" "Build Tools" "Ensure Android SDK build-tools 35.0.0+ for zipalign" + + print_subsection "Step 2: Configure 16KB ELF Alignment" + echo + echo -e "${BOLD}For NDK r28 and newer:${ENDCOLOR}" + print_status "success" "Automatic Support" "16KB alignment enabled by default - no changes needed!" + + echo + echo -e "${BOLD}For NDK r27:${ENDCOLOR}" + print_status "info" "Gradle Configuration" "Add to your app/build.gradle:" + echo -e "${DIM} android {" + echo -e " defaultConfig {" + echo -e " externalNativeBuild {" + echo -e " cmake {" + echo -e " arguments '-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON'" + echo -e " }" + echo -e " }" + echo -e " }" + echo -e " }${ENDCOLOR}" + + print_status "info" "NDK-Build Configuration" "Add to Application.mk:" + echo -e "${DIM} APP_SUPPORT_FLEXIBLE_PAGE_SIZES := true${ENDCOLOR}" + + echo + echo -e "${BOLD}For NDK r26 and older:${ENDCOLOR}" + print_status "info" "Manual Linker Flags" "Add to your native build configuration:" + echo -e "${DIM} # For Android.mk:" + echo -e " LOCAL_LDFLAGS += \"-Wl,-z,max-page-size=16384\"" + echo + echo -e " # For CMakeLists.txt:" + echo -e " target_link_options(\${CMAKE_PROJECT_NAME} PRIVATE \"-Wl,-z,max-page-size=16384\")${ENDCOLOR}" + + print_subsection "Step 3: Update Library Packaging" + print_status "info" "AGP 8.5.1+" "Uncompressed libraries used by default (no changes needed)" + print_status "info" "Older AGP versions" "Add to app/build.gradle:" + echo -e "${DIM} android {" + echo -e " packagingOptions {" + echo -e " jniLibs {" + echo -e " useLegacyPackaging = true" + echo -e " }" + echo -e " }" + echo -e " }${ENDCOLOR}" + + print_subsection "Step 4: Build and Verify" + print_status "processing" "Clean Build" "Run ./gradlew clean" + print_status "processing" "Rebuild Project" "Run ./gradlew assembleRelease" + print_status "processing" "Re-run This Script" "Verify all libraries are now aligned" + print_status "processing" "Test on Device" "Use Android 15 emulator with 16KB system image" + + print_section "$BOOKS" "Additional Resources" "Learn more about 16KB page size support" + print_status "info" "Official Guide" "https://developer.android.com/guide/practices/page-sizes" + print_status "info" "NDK Documentation" "https://developer.android.com/ndk/guides/" + print_status "info" "Testing Guide" "Use 'adb shell getconf PAGE_SIZE' (should return 16384)" + print_status "info" "Emulator Setup" "Android 15 system images with 16KB page size" + + final_message="" + if [ ${#critical_unaligned_libs[@]} -gt 0 ]; then + final_message="CRITICAL: Fix required for Google Play compliance by November 1st, 2025!" + else + final_message="Warning: Non-critical issues found - recommended to fix for complete compatibility" + fi + + print_summary_box "NEXT STEPS" "error" \ + "$final_message" \ + "" \ + "1. Update your build tools and NDK version" \ + "2. Apply the configuration changes above" \ + "3. Clean and rebuild your project" \ + "4. Run this script again to verify fixes" \ + "5. Test thoroughly on 16KB devices/emulator" + + cleanup_trap 1 +else + # Success case - all libraries aligned + summary_lines=( + "${PARTY} All native libraries are properly aligned!" + "" + "Analysis Results:" + " • Total libraries scanned: $total_libs" + " • Critical architectures: $critical_libs" + " • All libraries: ${#aligned_libs[@]}/${total_libs} ALIGNED" + "" + "Google Play Compliance: PASSED ${CHECK_MARK}" + "Ready for November 1st, 2025 deadline!" + ) + + print_summary_box "COMPATIBILITY CHECK PASSED" "success" "${summary_lines[@]}" + + print_section "$ROCKET" "Next Steps" "Ensure complete 16KB compatibility" + + print_status "success" "Library Alignment" "All ELF segments properly aligned for 16KB pages" + print_status "info" "Runtime Testing" "Test on Android 15 emulator with 16KB system image" + print_status "info" "Code Review" "Check for hardcoded PAGE_SIZE dependencies in your code" + print_status "info" "Third-party SDKs" "Verify all dependencies are 16KB compatible" + print_status "info" "Zipalign Verification" "Run: zipalign -c -P 16 -v 4 your-app.apk" + + print_subsection "Testing Commands" + echo -e "${DIM} # Verify page size on device/emulator${ENDCOLOR}" + echo -e "${DIM} adb shell getconf PAGE_SIZE # Should return: 16384${ENDCOLOR}" + echo + echo -e "${DIM} # Verify APK alignment${ENDCOLOR}" + echo -e "${DIM} zipalign -c -P 16 -v 4 app-release.apk${ENDCOLOR}" + + print_summary_box "CONGRATULATIONS!" "success" \ + "${PARTY} Your app is 16KB page size compatible!" \ + "" \ + "${CHECK_MARK} All native libraries meet Google Play requirements" \ + "${CHECK_MARK} Ready for devices with 16KB page sizes" \ + "${CHECK_MARK} Compliant with November 1st, 2025 deadline" \ + "" \ + "Recommendation: Test thoroughly on 16KB environment to ensure" \ + "no runtime issues exist in your application code." +fi + +echo +print_status "info" "Analysis completed at $(date)" +echo diff --git a/ci/patch_pubspec.py b/.github/scripts/patch_pubspec.py similarity index 91% rename from ci/patch_pubspec.py rename to .github/scripts/patch_pubspec.py index d655767a..66689a46 100644 --- a/ci/patch_pubspec.py +++ b/.github/scripts/patch_pubspec.py @@ -1,3 +1,7 @@ +# /// script +# dependencies = ["pyyaml"] +# /// + import os import pathlib import sys @@ -22,7 +26,7 @@ "serious_python_macos", ] -with open(pubspec_path, "r") as f: +with open(pubspec_path) as f: data = yaml.safe_load(f) # patch version diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..0dda04c3 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,296 @@ +name: CI + +on: + push: + branches: + - '**' + tags: + - '*' + pull_request: + workflow_dispatch: + +env: + ROOT: "${{ github.workspace }}" + SCRIPTS: "${{ github.workspace }}/.github/scripts" + SERIOUS_PYTHON_SITE_PACKAGES: "${{ github.workspace }}/site-packages" + UV_PYTHON: "3.12" + +jobs: + macos: + name: Test on macOS + runs-on: macos-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Flutter + uses: kuhnroyal/flutter-fvm-config-action/setup@v3 + with: + path: '.fvmrc' + cache: true + + - name: Run tests + working-directory: "src/serious_python/example/flet_example" + run: | + dart run serious_python:main package app/src --platform Darwin --requirements flet + flutter test integration_test --device-id macos + + ios: + name: Test on iOS + runs-on: macos-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Flutter + uses: kuhnroyal/flutter-fvm-config-action/setup@v3 + with: + path: '.fvmrc' + cache: true + + - name: Setup iOS Simulator + id: simulator + uses: futureware-tech/simulator-action@v4 + with: + # https://github.com/futureware-tech/simulator-action/wiki/Devices-macos-latest + model: 'iPhone 16 Pro Max' + os: "iOS" + os_version: "^18.6" + shutdown_after_job: true + wait_for_boot: true + + - name: Run tests + working-directory: "src/serious_python/example/flet_example" + run: | + dart run serious_python:main package app/src --platform iOS --requirements flet + flutter test integration_test --device-id ${{ steps.simulator.outputs.udid }} + + android: + name: Test on Android + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Flutter + uses: kuhnroyal/flutter-fvm-config-action/setup@v3 + with: + path: '.fvmrc' + cache: true + + - name: Enable KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm + + - name: Gradle cache + uses: gradle/actions/setup-gradle@v3 + + - name: AVD cache + uses: actions/cache@v4 + id: avd-cache + with: + path: | + ~/.android/avd/* + ~/.android/adb* + key: avd + + - name: Setup Android Emulator + Run tests + uses: reactivecircus/android-emulator-runner@v2 + env: + EMULATOR_PORT: 5554 + with: + avd-name: android_emulator + api-level: 33 + target: google_atd + arch: x86_64 + profile: pixel_5 + sdcard-path-or-size: 128M + ram-size: 2048M + disk-size: 4096M + emulator-port: ${{ env.EMULATOR_PORT }} + disable-animations: true + emulator-options: -no-window -noaudio -no-boot-anim -wipe-data -cache-size 1000 -partition-size 8192 + pre-emulator-launch-script: | + sdkmanager --list_installed + script: | + cd src/serious_python/example/flet_example && dart run serious_python:main package app/src --platform Android --requirements flet + cd src/serious_python/example/flet_example && flutter test integration_test --device-id emulator-${{ env.EMULATOR_PORT }} + + windows: + name: Test on Windows + runs-on: windows-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Flutter + uses: kuhnroyal/flutter-fvm-config-action/setup@v3 + with: + path: '.fvmrc' + cache: true + + - name: Run tests + working-directory: "src/serious_python/example/flet_example" + run: | + dart run serious_python:main package app/src --platform Windows --requirements flet + flutter test integration_test -d windows + + linux: + name: Test on Linux ${{ matrix.title }} + runs-on: ${{ matrix.runner }} + strategy: + fail-fast: false + matrix: + include: + - arch: arm64 + runner: ubuntu-24.04-arm + title: ARM64 + - arch: amd64 + runner: ubuntu-24.04 + title: AMD64 + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup uv + uses: astral-sh/setup-uv@v6 + + - name: Get Flutter version from ".fvmrc" + uses: kuhnroyal/flutter-fvm-config-action/config@v3 + id: fvm-config-action + with: + path: '.fvmrc' + + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }} + channel: ${{ matrix.arch == 'arm64' && 'master' || 'stable' }} # https://github.com/subosito/flutter-action/issues/345#issuecomment-2657332687 + cache: true + + - name: Install dependencies + run: | + sudo apt-get update --allow-releaseinfo-change + sudo apt-get install -y xvfb libgtk-3-dev + + if [ "${{ matrix.arch }}" = "amd64" ]; then + sudo apt-get install -y \ + libgstreamer1.0-dev \ + libgstreamer-plugins-base1.0-dev \ + libgstreamer-plugins-bad1.0-dev \ + gstreamer1.0-plugins-base \ + gstreamer1.0-plugins-good \ + gstreamer1.0-plugins-bad \ + gstreamer1.0-plugins-ugly \ + gstreamer1.0-libav \ + gstreamer1.0-tools \ + gstreamer1.0-x \ + gstreamer1.0-alsa \ + gstreamer1.0-gl \ + gstreamer1.0-gtk3 \ + gstreamer1.0-qt5 \ + gstreamer1.0-pulseaudio + else + sudo apt-get install -y \ + clang \ + ninja-build \ + gstreamer1.0-plugins-bad \ + gstreamer1.0-plugins-ugly \ + gstreamer1.0-libav + fi + + - name: Run tests + working-directory: src/serious_python/example/flet_example + run: | + flutter pub get + dart run serious_python:main package app/src --platform Linux --requirements flet + xvfb-run flutter test integration_test -d linux + + publish: + name: Publish to pub.dev + needs: + - macos + - ios + - android + - windows + - linux + runs-on: ubuntu-22.04 + if: startsWith(github.ref, 'refs/tags/v') + steps: + + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup uv + uses: astral-sh/setup-uv@v6 + + - name: Setup Flutter + uses: kuhnroyal/flutter-fvm-config-action/setup@v3 + with: + path: '.fvmrc' + cache: true + + - name: Compute PKG_VER + run: | + if [[ "$GITHUB_REF" == refs/tags/* ]]; then + # Extract the tag name + tag="${GITHUB_REF#refs/tags/}" + + # Remove leading "v" if present + PKG_VER="${tag#v}" + else + # Get the latest tag, or fall back to "v0.0.0" if none exist + cv=$(git describe --abbrev=0 2>/dev/null || echo "v0.0.0") + # Remove leading "v" if present + cv=${cv#v} + + # Split into major/minor components + major=$(echo "$cv" | cut -d. -f1) + minor=$(echo "$cv" | cut -d. -f2) + + # Construct the package version + PKG_VER="${major}.${minor}.${GITHUB_RUN_NUMBER}" + fi + + export PKG_VER + echo "PKG_VER=$PKG_VER" | tee -a "$GITHUB_ENV" + + - name: Configure pub.dev credentials + run: | + mkdir -p $HOME/.config/dart + echo "${{ secrets.PUB_DEV_TOKEN }}" | base64 --decode > $HOME/.config/dart/pub-credentials.json + + - name: Patch pubspec versions + working-directory: "src" + run: | + for pkg in \ + "serious_python" \ + "serious_python_platform_interface" \ + "serious_python_android" \ + "serious_python_darwin" \ + "serious_python_windows" \ + "serious_python_linux"; do + + uv run "$SCRIPTS/patch_pubspec.py" "$pkg/pubspec.yaml" "$PKG_VER" + done + + - name: Publish packages + run: | + publish_pkg () { + pushd "$1" >/dev/null + dart pub publish --force + popd >/dev/null + } + + publish_pkg src/serious_python_platform_interface + sleep 600 + publish_pkg src/serious_python_android + publish_pkg src/serious_python_darwin + publish_pkg src/serious_python_windows + publish_pkg src/serious_python_linux + sleep 600 + publish_pkg src/serious_python \ No newline at end of file diff --git a/ci/download_artifact.py b/ci/download_artifact.py deleted file mode 100644 index 6b37f5d7..00000000 --- a/ci/download_artifact.py +++ /dev/null @@ -1,51 +0,0 @@ -import json -import os -import pathlib -import sys -import tarfile -import urllib.request - -if len(sys.argv) < 2: - print("Specify artifact job name and artifact deployment name to download") - sys.exit(1) - -artifact_job_name = sys.argv[1] -artifact_file_name = sys.argv[2].format( - version=os.environ.get("APPVEYOR_BUILD_VERSION") -) - -build_jobs = {} - - -def download_job_artifact(job_id, file_name, dest_file): - url = f"https://ci.appveyor.com/api/buildjobs/{job_id}/artifacts/{file_name}" - print(f"Downloading {url}...") - urllib.request.urlretrieve(url, dest_file) - - -def get_build_job_ids(): - account_name = os.environ.get("APPVEYOR_ACCOUNT_NAME") - project_slug = os.environ.get("APPVEYOR_PROJECT_SLUG") - build_id = os.environ.get("APPVEYOR_BUILD_ID") - url = f"https://ci.appveyor.com/api/projects/{account_name}/{project_slug}/builds/{build_id}" - print(f"Fetching build details at {url}") - req = urllib.request.Request(url) - req.add_header("Content-type", "application/json") - project = json.loads(urllib.request.urlopen(req).read().decode()) - for job in project["build"]["jobs"]: - build_jobs[job["name"]] = job["jobId"] - - -current_dir = pathlib.Path(os.getcwd()) -print("current_dir", current_dir) - -get_build_job_ids() - -# create "web" directory -dist_path = current_dir.joinpath("python_dist") -dist_path.mkdir(exist_ok=True) -tar_path = current_dir.joinpath(artifact_file_name) -download_job_artifact(build_jobs[artifact_job_name], artifact_file_name, tar_path) -with tarfile.open(tar_path, "r:gz") as tar: - tar.extractall(str(dist_path)) -os.remove(tar_path) diff --git a/ci/install_flutter.sh b/ci/install_flutter.sh deleted file mode 100755 index 7366c8af..00000000 --- a/ci/install_flutter.sh +++ /dev/null @@ -1,6 +0,0 @@ -dart pub global activate fvm -export PATH=$HOME/.pub-cache/bin:$HOME/fvm/default/bin:$PATH -fvm install $FLUTTER_VERSION -fvm global $FLUTTER_VERSION -flutter --version -flutter doctor \ No newline at end of file diff --git a/src/serious_python/CHANGELOG.md b/src/serious_python/CHANGELOG.md index 3aad09c5..4d973579 100644 --- a/src/serious_python/CHANGELOG.md +++ b/src/serious_python/CHANGELOG.md @@ -1,4 +1,6 @@ ## 0.9.4 + +* 16 KB memory page support for Android 15+ (by [@ReYaNOW](https://github.com/ReYaNOW)). * Fix: Updated compileSdkVersion to pass Android builds * Fix: The version of the dependency `archive` was increased to `4.0.7` and code changes were made for migration. diff --git a/src/serious_python/example/flet_example/integration_test/app_test.dart b/src/serious_python/example/flet_example/integration_test/app_test.dart index d32be512..880d75ff 100644 --- a/src/serious_python/example/flet_example/integration_test/app_test.dart +++ b/src/serious_python/example/flet_example/integration_test/app_test.dart @@ -10,7 +10,7 @@ void main() { testWidgets('make sure counter can be incremented and decremented', (tester) async { app.main(); - await tester.pumpAndSettle(); + await tester.pumpAndSettle(const Duration(seconds: 5)); // Wait for up to 10 seconds for the app to start bool counterFound = false; diff --git a/src/serious_python_android/CHANGELOG.md b/src/serious_python_android/CHANGELOG.md index 075ab98c..658f9f8d 100644 --- a/src/serious_python_android/CHANGELOG.md +++ b/src/serious_python_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.4 + +* 16 KB memory page support for Android 15+ (by [@ReYaNOW](https://github.com/ReYaNOW)). + ## 0.9.3 * Fix: Hidden files in site-packages are skipped when building macOS app. diff --git a/src/serious_python_android/analysis_options.yaml b/src/serious_python_android/analysis_options.yaml index 872a1ebd..e550cb50 100644 --- a/src/serious_python_android/analysis_options.yaml +++ b/src/serious_python_android/analysis_options.yaml @@ -1,4 +1,8 @@ include: package:flutter_lints/flutter.yaml +analyzer: + exclude: + - lib/src/gen.dart + # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options \ No newline at end of file diff --git a/src/serious_python_android/android/build.gradle b/src/serious_python_android/android/build.gradle index c72c2dd5..f0a3444a 100644 --- a/src/serious_python_android/android/build.gradle +++ b/src/serious_python_android/android/build.gradle @@ -54,7 +54,7 @@ android { } defaultConfig { - minSdkVersion 16 + minSdkVersion 21 ndk { abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64' diff --git a/src/serious_python_android/src/CMakeLists.txt b/src/serious_python_android/src/CMakeLists.txt index 2d52ffcd..c2800814 100644 --- a/src/serious_python_android/src/CMakeLists.txt +++ b/src/serious_python_android/src/CMakeLists.txt @@ -14,4 +14,11 @@ set_target_properties(serious_python PROPERTIES OUTPUT_NAME "serious_python" ) +# Add 16 KB page size support for Android 15 +if(ANDROID) + set_target_properties(serious_python PROPERTIES + LINK_FLAGS "-Wl,-z,max-page-size=16384" + ) +endif() + target_compile_definitions(serious_python PUBLIC DART_SHARED_LIB) diff --git a/src/serious_python_darwin/CHANGELOG.md b/src/serious_python_darwin/CHANGELOG.md index 07cd93da..330b8328 100644 --- a/src/serious_python_darwin/CHANGELOG.md +++ b/src/serious_python_darwin/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.4 + +* 16 KB memory page support for Android 15+ (by [@ReYaNOW](https://github.com/ReYaNOW)). + ## 0.9.3 * Fix: Hidden files in site-packages are skipped when building macOS app. diff --git a/src/serious_python_linux/CHANGELOG.md b/src/serious_python_linux/CHANGELOG.md index e4e42b45..0f06bba1 100644 --- a/src/serious_python_linux/CHANGELOG.md +++ b/src/serious_python_linux/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.4 + +* 16 KB memory page support for Android 15+ (by [@ReYaNOW](https://github.com/ReYaNOW)). + ## 0.9.3 * Fix: Hidden files in site-packages are skipped when building macOS app. diff --git a/src/serious_python_platform_interface/CHANGELOG.md b/src/serious_python_platform_interface/CHANGELOG.md index c66601dd..bb1ffc8f 100644 --- a/src/serious_python_platform_interface/CHANGELOG.md +++ b/src/serious_python_platform_interface/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.4 + +* 16 KB memory page support for Android 15+ (by [@ReYaNOW](https://github.com/ReYaNOW)). + ## 0.9.3 * Fix: Hidden files in site-packages are skipped when building macOS app. diff --git a/src/serious_python_windows/CHANGELOG.md b/src/serious_python_windows/CHANGELOG.md index 64dde934..a29364f5 100644 --- a/src/serious_python_windows/CHANGELOG.md +++ b/src/serious_python_windows/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.4 + +* 16 KB memory page support for Android 15+ (by [@ReYaNOW](https://github.com/ReYaNOW)). + ## 0.9.3 * Fix: Hidden files in site-packages are skipped when building macOS app.