From 9169d626eab0277dc3fe5157ed36e37abf332f5a Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Sun, 16 Nov 2025 10:07:47 -0800 Subject: [PATCH 1/4] Fix leading dash in framework identifier generation Ensures that any leading dashes are removed from the generated framework identifier in xcframework_utils.sh. Defaults to 'framework' if the identifier is empty after processing. --- src/serious_python_darwin/darwin/xcframework_utils.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/serious_python_darwin/darwin/xcframework_utils.sh b/src/serious_python_darwin/darwin/xcframework_utils.sh index 14ab4373..2bcc0936 100644 --- a/src/serious_python_darwin/darwin/xcframework_utils.sh +++ b/src/serious_python_darwin/darwin/xcframework_utils.sh @@ -55,7 +55,11 @@ create_xcframework_from_dylibs() { dylib_without_ext=$(echo $dylib_relative_path | cut -d "." -f 1) framework=$(echo $dylib_without_ext | tr "/" ".") framework_identifier=${framework//_/-} - + while [[ $framework_identifier == -* ]]; do + framework_identifier=${framework_identifier#-} + done + framework_identifier=${framework_identifier:-framework} + # creating "iphoneos" framework fd=iphoneos/$framework.framework mkdir -p $fd From 2d4c0641804c5869dfe2add73d32133ef0d5fdd9 Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Sun, 16 Nov 2025 14:05:18 -0800 Subject: [PATCH 2/4] Update CFBundlePackageType to FMWK in plist generation Changed the CFBundlePackageType from 'APPL' to 'FMWK' in the create_plist function to correctly identify the bundle as a framework. Also made a minor whitespace adjustment in create_xcframework_from_dylibs. --- src/serious_python_darwin/darwin/xcframework_utils.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/serious_python_darwin/darwin/xcframework_utils.sh b/src/serious_python_darwin/darwin/xcframework_utils.sh index 2bcc0936..87447b4a 100644 --- a/src/serious_python_darwin/darwin/xcframework_utils.sh +++ b/src/serious_python_darwin/darwin/xcframework_utils.sh @@ -23,7 +23,7 @@ create_plist() { CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType - APPL + FMWK CFBundleShortVersionString 1.0 CFBundleSupportedPlatforms @@ -59,7 +59,7 @@ create_xcframework_from_dylibs() { framework_identifier=${framework_identifier#-} done framework_identifier=${framework_identifier:-framework} - + # creating "iphoneos" framework fd=iphoneos/$framework.framework mkdir -p $fd From 4e65fa87bc4c1c5dc852ed973456411e151b4c61 Mon Sep 17 00:00:00 2001 From: TheEthicalBoy <98978078+ndonkoHenri@users.noreply.github.com> Date: Mon, 1 Dec 2025 17:53:32 +0100 Subject: [PATCH 3/4] Bump `archive` dependency to `^4.0.7` (#184) * update `archive` dependency to ``^4.0.7` and bump serious_python version to `0.9.5` * revert flutter_lints dependency to version 2.0.0 * Bump version to 0.9.5 for Android and Darwin Updated the version number to 0.9.5 in both the Android build.gradle and Darwin podspec files to prepare for a new release. --------- Co-authored-by: Feodor Fitsner --- src/serious_python/CHANGELOG.md | 4 ++++ src/serious_python/pubspec.yaml | 4 ++-- src/serious_python_android/CHANGELOG.md | 4 ++++ 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/CHANGELOG.md | 4 ++++ src/serious_python_linux/pubspec.yaml | 2 +- src/serious_python_platform_interface/CHANGELOG.md | 4 ++++ src/serious_python_platform_interface/lib/src/utils.dart | 4 ++-- src/serious_python_platform_interface/pubspec.yaml | 2 +- src/serious_python_windows/CHANGELOG.md | 4 ++++ src/serious_python_windows/pubspec.yaml | 2 +- 14 files changed, 31 insertions(+), 11 deletions(-) diff --git a/src/serious_python/CHANGELOG.md b/src/serious_python/CHANGELOG.md index 614940aa..a3ac0e15 100644 --- a/src/serious_python/CHANGELOG.md +++ b/src/serious_python/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.5 + +* Bump `archive` to `^4.0.7`. + ## 0.9.4 * 16 KB memory page support for Android 15+ (by [@ReYaNOW](https://github.com/ReYaNOW)). diff --git a/src/serious_python/pubspec.yaml b/src/serious_python/pubspec.yaml index 732cee5f..640186fb 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.4 +version: 0.9.5 platforms: ios: @@ -44,7 +44,7 @@ dependencies: path: ../serious_python_linux path_provider: ^2.1.3 - archive: ^3.6.1 + archive: ^4.0.7 path: ^1.9.0 args: ^2.5.0 toml: ^0.15.0 diff --git a/src/serious_python_android/CHANGELOG.md b/src/serious_python_android/CHANGELOG.md index 658f9f8d..714f7f52 100644 --- a/src/serious_python_android/CHANGELOG.md +++ b/src/serious_python_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.5 + +* Bump `archive` to `^4.0.7`. + ## 0.9.4 * 16 KB memory page support for Android 15+ (by [@ReYaNOW](https://github.com/ReYaNOW)). diff --git a/src/serious_python_android/android/build.gradle b/src/serious_python_android/android/build.gradle index 35d43607..39d1f4d3 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.4' +version '0.9.5' def python_version = '3.12' diff --git a/src/serious_python_android/pubspec.yaml b/src/serious_python_android/pubspec.yaml index 90adfe9c..d0291a00 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.4 +version: 0.9.5 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 05f0de51..5993eac2 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.4' + s.version = '0.9.5' 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 655f04c3..284f47c1 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.4 +version: 0.9.5 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 0f06bba1..e8079a0c 100644 --- a/src/serious_python_linux/CHANGELOG.md +++ b/src/serious_python_linux/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.5 + +* Bump `archive` to `^4.0.7`. + ## 0.9.4 * 16 KB memory page support for Android 15+ (by [@ReYaNOW](https://github.com/ReYaNOW)). diff --git a/src/serious_python_linux/pubspec.yaml b/src/serious_python_linux/pubspec.yaml index b2b22e82..47f3a8f3 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.4 +version: 0.9.5 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 bb1ffc8f..eb684e0d 100644 --- a/src/serious_python_platform_interface/CHANGELOG.md +++ b/src/serious_python_platform_interface/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.5 + +* Bump `archive` to `^4.0.7`. + ## 0.9.4 * 16 KB memory page support for Android 15+ (by [@ReYaNOW](https://github.com/ReYaNOW)). 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); diff --git a/src/serious_python_platform_interface/pubspec.yaml b/src/serious_python_platform_interface/pubspec.yaml index a5428de2..d75fe903 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.7 path: ^1.9.0 dev_dependencies: diff --git a/src/serious_python_windows/CHANGELOG.md b/src/serious_python_windows/CHANGELOG.md index a29364f5..010bed7a 100644 --- a/src/serious_python_windows/CHANGELOG.md +++ b/src/serious_python_windows/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.9.5 + +* Bump `archive` to `^4.0.7`. + ## 0.9.4 * 16 KB memory page support for Android 15+ (by [@ReYaNOW](https://github.com/ReYaNOW)). diff --git a/src/serious_python_windows/pubspec.yaml b/src/serious_python_windows/pubspec.yaml index 823f9799..138323dc 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.4 +version: 0.9.5 environment: sdk: '>=3.1.3 <4.0.0' From 17b01b0b9b5dd33fcb9cc01314b5b52448364791 Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Mon, 1 Dec 2025 08:55:09 -0800 Subject: [PATCH 4/4] Update changelogs for iOS framework identifier fix Added notes to all package changelogs for version 0.9.5 about the fix for iOS framework identifier generation. --- src/serious_python/CHANGELOG.md | 1 + src/serious_python_android/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 + 5 files changed, 5 insertions(+) diff --git a/src/serious_python/CHANGELOG.md b/src/serious_python/CHANGELOG.md index a3ac0e15..4791e9d0 100644 --- a/src/serious_python/CHANGELOG.md +++ b/src/serious_python/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.9.5 * Bump `archive` to `^4.0.7`. +* Fixed iOS framework identifier generation. ## 0.9.4 diff --git a/src/serious_python_android/CHANGELOG.md b/src/serious_python_android/CHANGELOG.md index 714f7f52..89c435fa 100644 --- a/src/serious_python_android/CHANGELOG.md +++ b/src/serious_python_android/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.9.5 * Bump `archive` to `^4.0.7`. +* Fixed iOS framework identifier generation. ## 0.9.4 diff --git a/src/serious_python_linux/CHANGELOG.md b/src/serious_python_linux/CHANGELOG.md index e8079a0c..269bbc1f 100644 --- a/src/serious_python_linux/CHANGELOG.md +++ b/src/serious_python_linux/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.9.5 * Bump `archive` to `^4.0.7`. +* Fixed iOS framework identifier generation. ## 0.9.4 diff --git a/src/serious_python_platform_interface/CHANGELOG.md b/src/serious_python_platform_interface/CHANGELOG.md index eb684e0d..54670e7d 100644 --- a/src/serious_python_platform_interface/CHANGELOG.md +++ b/src/serious_python_platform_interface/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.9.5 * Bump `archive` to `^4.0.7`. +* Fixed iOS framework identifier generation. ## 0.9.4 diff --git a/src/serious_python_windows/CHANGELOG.md b/src/serious_python_windows/CHANGELOG.md index 010bed7a..09e5bf91 100644 --- a/src/serious_python_windows/CHANGELOG.md +++ b/src/serious_python_windows/CHANGELOG.md @@ -1,6 +1,7 @@ ## 0.9.5 * Bump `archive` to `^4.0.7`. +* Fixed iOS framework identifier generation. ## 0.9.4