diff --git a/src/serious_python/CHANGELOG.md b/src/serious_python/CHANGELOG.md index a93c378e..cc7cd5f3 100644 --- a/src/serious_python/CHANGELOG.md +++ b/src/serious_python/CHANGELOG.md @@ -1,3 +1,12 @@ +## 0.8.6 + +* Added `com.flet.serious_python_android.PythonActivity` holder class with `mActivity` holding a reference to an app MainActivity. Needed for `plyer`. +* Android plugin sets `MAIN_ACTIVITY_HOST_CLASS_NAME` environment variable with the name of activity holder class name (`com.flet.serious_python_android.PythonActivity`). +* Android plugin sets `MAIN_ACTIVITY_CLASS_NAME` environment variable with a class name of an app MainActivity. +* Android plugin sets `ANDROID_NATIVE_LIBRARY_DIR` environment variable with the path to a directory containing app .so libraries. Needed for patching `ctypes.find_library`. +* Changed behavior of `SERIOUS_PYTHON_ALLOW_SOURCE_DISTRIBUTIONS` environment variable that should contain a comma-separated list of packages to allow installation from source distribution. +* Fixed: iOS `site-packages` to `xcframeworks` migration script supports both `library.so` and `library.{something}.so`. + ## 0.8.5 * Added Java `loadLibrary` to Android plugin to support `pyjnius` ([#128](https://github.com/flet-dev/serious-python/issues/128)). diff --git a/src/serious_python/bin/package_command.dart b/src/serious_python/bin/package_command.dart index be3e0c6c..ab658d84 100644 --- a/src/serious_python/bin/package_command.dart +++ b/src/serious_python/bin/package_command.dart @@ -303,10 +303,15 @@ class PackageCommand extends Command { List pipArgs = ["--disable-pip-version-check"]; - if ((isMobile || isWeb) && - !Platform.environment - .containsKey(allowSourceDistrosEnvironmentVariable)) { + if (isMobile || isWeb) { pipArgs.addAll(["--only-binary", ":all:"]); + if (Platform.environment + .containsKey(allowSourceDistrosEnvironmentVariable)) { + pipArgs.addAll([ + "--no-binary", + Platform.environment[allowSourceDistrosEnvironmentVariable]! + ]); + } } for (var index in extraPyPiIndexes) { diff --git a/src/serious_python/example/flask_example/pubspec.lock b/src/serious_python/example/flask_example/pubspec.lock index a0cad66f..de2ac3cd 100644 --- a/src/serious_python/example/flask_example/pubspec.lock +++ b/src/serious_python/example/flask_example/pubspec.lock @@ -127,18 +127,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: @@ -167,18 +167,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.11.1" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.12.0" path: dependency: transitive description: @@ -265,42 +265,42 @@ packages: path: "../.." relative: true source: path - version: "0.8.0" + version: "0.8.6" serious_python_android: dependency: transitive description: path: "../../../serious_python_android" relative: true source: path - version: "0.8.0" + version: "0.8.6" serious_python_darwin: dependency: transitive description: path: "../../../serious_python_darwin" relative: true source: path - version: "0.8.0" + version: "0.8.6" serious_python_linux: dependency: transitive description: path: "../../../serious_python_linux" relative: true source: path - version: "0.8.0" + version: "0.8.6" serious_python_platform_interface: dependency: transitive description: path: "../../../serious_python_platform_interface" relative: true source: path - version: "0.8.0" + version: "0.8.6" serious_python_windows: dependency: transitive description: path: "../../../serious_python_windows" relative: true source: path - version: "0.8.0" + version: "0.8.6" shelf: dependency: transitive description: @@ -358,10 +358,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.0" toml: dependency: transitive description: @@ -390,10 +390,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.2.1" web: dependency: transitive description: diff --git a/src/serious_python/example/flet_example/pubspec.lock b/src/serious_python/example/flet_example/pubspec.lock index 6d085518..5128fb94 100644 --- a/src/serious_python/example/flet_example/pubspec.lock +++ b/src/serious_python/example/flet_example/pubspec.lock @@ -264,18 +264,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: @@ -320,18 +320,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.11.1" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.12.0" package_info_plus: dependency: "direct main" description: @@ -424,10 +424,10 @@ packages: dependency: transitive description: name: platform - sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" url: "https://pub.dev" source: hosted - version: "3.1.5" + version: "3.1.4" plugin_platform_interface: dependency: transitive description: @@ -482,42 +482,42 @@ packages: path: "../.." relative: true source: path - version: "0.8.4" + version: "0.8.6" serious_python_android: dependency: transitive description: path: "../../../serious_python_android" relative: true source: path - version: "0.8.4" + version: "0.8.6" serious_python_darwin: dependency: transitive description: path: "../../../serious_python_darwin" relative: true source: path - version: "0.8.4" + version: "0.8.6" serious_python_linux: dependency: transitive description: path: "../../../serious_python_linux" relative: true source: path - version: "0.8.4" + version: "0.8.6" serious_python_platform_interface: dependency: transitive description: path: "../../../serious_python_platform_interface" relative: true source: path - version: "0.8.4" + version: "0.8.6" serious_python_windows: dependency: transitive description: path: "../../../serious_python_windows" relative: true source: path - version: "0.8.4" + version: "0.8.6" shared_preferences: dependency: transitive description: @@ -639,10 +639,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.0" toml: dependency: transitive description: @@ -671,10 +671,10 @@ packages: dependency: transitive description: name: url_launcher_android - sha256: e35a698ac302dd68e41f73250bd9517fe3ab5fa4f18fe4647a0872db61bacbab + sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79 url: "https://pub.dev" source: hosted - version: "6.3.10" + version: "6.3.9" url_launcher_ios: dependency: transitive description: @@ -767,10 +767,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.2.1" web: dependency: transitive description: @@ -836,5 +836,5 @@ packages: source: hosted version: "6.5.0" sdks: - dart: ">=3.5.0 <4.0.0" - flutter: ">=3.24.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" 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 6d2af648..8c524ad2 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 @@ -081229a0c5551f4c29faa2b6e8a23cba9e971d66f95565892561898e146a5d5e \ No newline at end of file +eb21e6e3680f591dc1c2a20e8ef88b69cffdf67f724e3a938f8aa8a759acb036 \ No newline at end of file diff --git a/src/serious_python/example/run_example/app/src/main.py b/src/serious_python/example/run_example/app/src/main.py index 3f92b20a..04ac479d 100644 --- a/src/serious_python/example/run_example/app/src/main.py +++ b/src/serious_python/example/run_example/app/src/main.py @@ -87,9 +87,9 @@ def test_numpy_performance(): def test_sqlite(): try: - import ctypes + # import ctypes - ctypes.cdll.LoadLibrary("libsqlite3_python.so") + # ctypes.cdll.LoadLibrary("libsqlite3_python.so") import sqlite3 out_dir = Path(result_filename).parent @@ -161,8 +161,8 @@ def test_pyjnius(): r += test_sqlite() -r += test_pyjnius() -# test_lru() +# r += test_pyjnius() +test_lru() # test_numpy_basic() # test_numpy_performance() 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 2859f989..deb90ad1 100644 --- a/src/serious_python/example/run_example/app/src/requirements.txt +++ b/src/serious_python/example/run_example/app/src/requirements.txt @@ -1,3 +1,6 @@ #numpy lru-dict -pyjnius \ No newline at end of file +#pyjnius +flet-libsodium +pysodium +#supabase \ No newline at end of file diff --git a/src/serious_python/example/run_example/ios/Podfile.lock b/src/serious_python/example/run_example/ios/Podfile.lock index ead94158..438086f2 100644 --- a/src/serious_python/example/run_example/ios/Podfile.lock +++ b/src/serious_python/example/run_example/ios/Podfile.lock @@ -5,7 +5,7 @@ PODS: - path_provider_foundation (0.0.1): - Flutter - FlutterMacOS - - serious_python_darwin (0.8.0): + - serious_python_darwin (0.8.5): - Flutter - FlutterMacOS @@ -29,7 +29,7 @@ SPEC CHECKSUMS: Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573 path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 - serious_python_darwin: 351e50099cb9e34f344f75af29b1d36d3c0922f2 + serious_python_darwin: 190aa70fd014e151039f01cc14eefb4408eeb724 PODFILE CHECKSUM: a57f30d18f102dd3ce366b1d62a55ecbef2158e5 diff --git a/src/serious_python/example/run_example/pubspec.lock b/src/serious_python/example/run_example/pubspec.lock index 64dfe7cd..bfd1a2ce 100644 --- a/src/serious_python/example/run_example/pubspec.lock +++ b/src/serious_python/example/run_example/pubspec.lock @@ -150,18 +150,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" + sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a" url: "https://pub.dev" source: hosted - version: "10.0.5" + version: "10.0.4" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" + sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.3" leak_tracker_testing: dependency: transitive description: @@ -190,18 +190,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.11.1" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136" url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.12.0" path: dependency: "direct main" description: @@ -270,10 +270,10 @@ packages: dependency: transitive description: name: platform - sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" + sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec" url: "https://pub.dev" source: hosted - version: "3.1.5" + version: "3.1.4" plugin_platform_interface: dependency: transitive description: @@ -296,42 +296,42 @@ packages: path: "../.." relative: true source: path - version: "0.8.4" + version: "0.8.6" serious_python_android: dependency: transitive description: path: "../../../serious_python_android" relative: true source: path - version: "0.8.4" + version: "0.8.6" serious_python_darwin: dependency: transitive description: path: "../../../serious_python_darwin" relative: true source: path - version: "0.8.4" + version: "0.8.6" serious_python_linux: dependency: transitive description: path: "../../../serious_python_linux" relative: true source: path - version: "0.8.4" + version: "0.8.6" serious_python_platform_interface: dependency: transitive description: path: "../../../serious_python_platform_interface" relative: true source: path - version: "0.8.4" + version: "0.8.6" serious_python_windows: dependency: transitive description: path: "../../../serious_python_windows" relative: true source: path - version: "0.8.4" + version: "0.8.6" shelf: dependency: transitive description: @@ -397,10 +397,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" + sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" url: "https://pub.dev" source: hosted - version: "0.7.2" + version: "0.7.0" toml: dependency: transitive description: @@ -429,10 +429,10 @@ packages: dependency: transitive description: name: vm_service - sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" + sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec" url: "https://pub.dev" source: hosted - version: "14.2.5" + version: "14.2.1" web: dependency: transitive description: diff --git a/src/serious_python/pubspec.yaml b/src/serious_python/pubspec.yaml index 8928dc91..e26c9e8f 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.8.5 +version: 0.8.6 platforms: ios: diff --git a/src/serious_python_android/CHANGELOG.md b/src/serious_python_android/CHANGELOG.md index ebcdf717..e345b6a3 100644 --- a/src/serious_python_android/CHANGELOG.md +++ b/src/serious_python_android/CHANGELOG.md @@ -1,3 +1,12 @@ +## 0.8.6 + +* Added `com.flet.serious_python_android.PythonActivity` holder class with `mActivity` holding a reference to an app MainActivity. Needed for `plyer`. +* Android plugin sets `MAIN_ACTIVITY_HOST_CLASS_NAME` environment variable with the name of activity holder class name (`com.flet.serious_python_android.PythonActivity`). +* Android plugin sets `MAIN_ACTIVITY_CLASS_NAME` environment variable with a class name of an app MainActivity. +* Android plugin sets `ANDROID_NATIVE_LIBRARY_DIR` environment variable with the path to a directory containing app .so libraries. Needed for patching `ctypes.find_library`. +* Changed behavior of `SERIOUS_PYTHON_ALLOW_SOURCE_DISTRIBUTIONS` environment variable that should contain a comma-separated list of packages to allow installation from source distribution. +* Fixed: iOS `site-packages` to `xcframeworks` migration script supports both `library.so` and `library.{something}.so`. + ## 0.8.5 * Added Java `loadLibrary` to Android plugin to support `pyjnius` ([#128](https://github.com/flet-dev/serious-python/issues/128)). diff --git a/src/serious_python_android/android/build.gradle b/src/serious_python_android/android/build.gradle index c1c1ce62..62c987fd 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.8.5' +version '0.8.6' def python_version = '3.12' diff --git a/src/serious_python_android/android/src/main/java/com/flet/serious_python_android/AndroidPlugin.java b/src/serious_python_android/android/src/main/java/com/flet/serious_python_android/AndroidPlugin.java index a18694ef..dcced8db 100644 --- a/src/serious_python_android/android/src/main/java/com/flet/serious_python_android/AndroidPlugin.java +++ b/src/serious_python_android/android/src/main/java/com/flet/serious_python_android/AndroidPlugin.java @@ -5,7 +5,6 @@ import androidx.annotation.NonNull; import android.system.Os; import android.content.Intent; -import android.app.Activity; import io.flutter.embedding.engine.plugins.FlutterPlugin; import io.flutter.embedding.engine.plugins.activity.ActivityAware; @@ -15,11 +14,14 @@ import io.flutter.plugin.common.MethodChannel.MethodCallHandler; import io.flutter.plugin.common.MethodChannel.Result; +import com.flet.serious_python_android.PythonActivity; + /** AndroidPlugin */ public class AndroidPlugin implements FlutterPlugin, MethodCallHandler, ActivityAware { public static final String MAIN_ACTIVITY_HOST_CLASS_NAME = "MAIN_ACTIVITY_HOST_CLASS_NAME"; - public static Activity mActivity = null; + public static final String MAIN_ACTIVITY_CLASS_NAME = "MAIN_ACTIVITY_CLASS_NAME"; + public static final String ANDROID_NATIVE_LIBRARY_DIR = "ANDROID_NATIVE_LIBRARY_DIR"; /// The MethodChannel that will the communication between Flutter and native /// Android @@ -36,13 +38,19 @@ public void onAttachedToEngine(@NonNull FlutterPluginBinding flutterPluginBindin "android_plugin"); channel.setMethodCallHandler(this); this.context = flutterPluginBinding.getApplicationContext(); + try { + Os.setenv(ANDROID_NATIVE_LIBRARY_DIR, new ContextWrapper(this.context).getApplicationInfo().nativeLibraryDir, true); + } catch (Exception e) { + // nothing to do + } } @Override public void onAttachedToActivity(@NonNull ActivityPluginBinding activityPluginBinding) { - mActivity = activityPluginBinding.getActivity(); + PythonActivity.mActivity = activityPluginBinding.getActivity(); try { - Os.setenv(MAIN_ACTIVITY_HOST_CLASS_NAME, this.getClass().getCanonicalName(), true); + Os.setenv(MAIN_ACTIVITY_HOST_CLASS_NAME, PythonActivity.class.getCanonicalName(), true); + Os.setenv(MAIN_ACTIVITY_CLASS_NAME, PythonActivity.mActivity.getClass().getCanonicalName(), true); } catch (Exception e) { // nothing to do } diff --git a/src/serious_python_android/android/src/main/java/com/flet/serious_python_android/PythonActivity.java b/src/serious_python_android/android/src/main/java/com/flet/serious_python_android/PythonActivity.java new file mode 100644 index 00000000..d7bc5d80 --- /dev/null +++ b/src/serious_python_android/android/src/main/java/com/flet/serious_python_android/PythonActivity.java @@ -0,0 +1,7 @@ +package com.flet.serious_python_android; + +import android.app.Activity; + +public class PythonActivity { + public static Activity mActivity = null; +} diff --git a/src/serious_python_android/pubspec.yaml b/src/serious_python_android/pubspec.yaml index fea34c59..70e04e4a 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.8.5 +version: 0.8.6 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 6ec3aeae..afbf69e9 100644 --- a/src/serious_python_darwin/CHANGELOG.md +++ b/src/serious_python_darwin/CHANGELOG.md @@ -1,3 +1,12 @@ +## 0.8.6 + +* Added `com.flet.serious_python_android.PythonActivity` holder class with `mActivity` holding a reference to an app MainActivity. Needed for `plyer`. +* Android plugin sets `MAIN_ACTIVITY_HOST_CLASS_NAME` environment variable with the name of activity holder class name (`com.flet.serious_python_android.PythonActivity`). +* Android plugin sets `MAIN_ACTIVITY_CLASS_NAME` environment variable with a class name of an app MainActivity. +* Android plugin sets `ANDROID_NATIVE_LIBRARY_DIR` environment variable with the path to a directory containing app .so libraries. Needed for patching `ctypes.find_library`. +* Changed behavior of `SERIOUS_PYTHON_ALLOW_SOURCE_DISTRIBUTIONS` environment variable that should contain a comma-separated list of packages to allow installation from source distribution. +* Fixed: iOS `site-packages` to `xcframeworks` migration script supports both `library.so` and `library.{something}.so`. + ## 0.8.5 * Added Java `loadLibrary` to Android plugin to support `pyjnius` ([#128](https://github.com/flet-dev/serious-python/issues/128)). diff --git a/src/serious_python_darwin/darwin/serious_python_darwin.podspec b/src/serious_python_darwin/darwin/serious_python_darwin.podspec index 166bec0d..c54edf35 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.8.5' + s.version = '0.8.6' 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/xcframework_utils.sh b/src/serious_python_darwin/darwin/xcframework_utils.sh index df90d9ca..da7f238f 100644 --- a/src/serious_python_darwin/darwin/xcframework_utils.sh +++ b/src/serious_python_darwin/darwin/xcframework_utils.sh @@ -69,11 +69,11 @@ create_xcframework_from_dylibs() { fd=iphonesimulator/$framework.framework mkdir -p $fd lipo -create \ - "$simulator_arm64_dir/$dylib_without_ext".*.$dylib_ext \ - "$simulator_x86_64_dir/$dylib_without_ext".*.$dylib_ext \ + $(find "$simulator_arm64_dir" -name "$dylib_without_ext.*.$dylib_ext" -o -name "$dylib_without_ext.$dylib_ext" -type f) \ + $(find "$simulator_x86_64_dir" -name "$dylib_without_ext.*.$dylib_ext" -o -name "$dylib_without_ext.$dylib_ext" -type f) \ -output $fd/$framework - rm "$simulator_arm64_dir/$dylib_without_ext".*.$dylib_ext - rm "$simulator_x86_64_dir/$dylib_without_ext".*.$dylib_ext + find "$simulator_arm64_dir" -name "$dylib_without_ext.*.$dylib_ext" -o -name "$dylib_without_ext.$dylib_ext" -type f -delete + find "$simulator_x86_64_dir" -name "$dylib_without_ext.*.$dylib_ext" -o -name "$dylib_without_ext.$dylib_ext" -type f -delete install_name_tool -id @rpath/$framework.framework/$framework $fd/$framework create_plist $framework "org.python.$framework_identifier" $fd/Info.plist echo "$origin_prefix/$dylib_without_ext.fwork" > $fd/$framework.origin diff --git a/src/serious_python_darwin/pubspec.yaml b/src/serious_python_darwin/pubspec.yaml index 9e5a627b..3ce77c79 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.8.5 +version: 0.8.6 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 14fe6fed..8252e53e 100644 --- a/src/serious_python_linux/CHANGELOG.md +++ b/src/serious_python_linux/CHANGELOG.md @@ -1,3 +1,12 @@ +## 0.8.6 + +* Added `com.flet.serious_python_android.PythonActivity` holder class with `mActivity` holding a reference to an app MainActivity. Needed for `plyer`. +* Android plugin sets `MAIN_ACTIVITY_HOST_CLASS_NAME` environment variable with the name of activity holder class name (`com.flet.serious_python_android.PythonActivity`). +* Android plugin sets `MAIN_ACTIVITY_CLASS_NAME` environment variable with a class name of an app MainActivity. +* Android plugin sets `ANDROID_NATIVE_LIBRARY_DIR` environment variable with the path to a directory containing app .so libraries. Needed for patching `ctypes.find_library`. +* Changed behavior of `SERIOUS_PYTHON_ALLOW_SOURCE_DISTRIBUTIONS` environment variable that should contain a comma-separated list of packages to allow installation from source distribution. +* Fixed: iOS `site-packages` to `xcframeworks` migration script supports both `library.so` and `library.{something}.so`. + ## 0.8.5 * Added Java `loadLibrary` to Android plugin to support `pyjnius` ([#128](https://github.com/flet-dev/serious-python/issues/128)). diff --git a/src/serious_python_linux/pubspec.yaml b/src/serious_python_linux/pubspec.yaml index 2bacc68c..10fc01dd 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.8.5 +version: 0.8.6 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 4cdf3a6f..8d09387e 100644 --- a/src/serious_python_platform_interface/CHANGELOG.md +++ b/src/serious_python_platform_interface/CHANGELOG.md @@ -1,3 +1,12 @@ +## 0.8.6 + +* Added `com.flet.serious_python_android.PythonActivity` holder class with `mActivity` holding a reference to an app MainActivity. Needed for `plyer`. +* Android plugin sets `MAIN_ACTIVITY_HOST_CLASS_NAME` environment variable with the name of activity holder class name (`com.flet.serious_python_android.PythonActivity`). +* Android plugin sets `MAIN_ACTIVITY_CLASS_NAME` environment variable with a class name of an app MainActivity. +* Android plugin sets `ANDROID_NATIVE_LIBRARY_DIR` environment variable with the path to a directory containing app .so libraries. Needed for patching `ctypes.find_library`. +* Changed behavior of `SERIOUS_PYTHON_ALLOW_SOURCE_DISTRIBUTIONS` environment variable that should contain a comma-separated list of packages to allow installation from source distribution. +* Fixed: iOS `site-packages` to `xcframeworks` migration script supports both `library.so` and `library.{something}.so`. + ## 0.8.5 * Added Java `loadLibrary` to Android plugin to support `pyjnius` ([#128](https://github.com/flet-dev/serious-python/issues/128)). diff --git a/src/serious_python_platform_interface/pubspec.yaml b/src/serious_python_platform_interface/pubspec.yaml index bb4434d9..220d0daa 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.8.5 +version: 0.8.6 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 a43514c7..1072c827 100644 --- a/src/serious_python_windows/CHANGELOG.md +++ b/src/serious_python_windows/CHANGELOG.md @@ -1,3 +1,12 @@ +## 0.8.6 + +* Added `com.flet.serious_python_android.PythonActivity` holder class with `mActivity` holding a reference to an app MainActivity. Needed for `plyer`. +* Android plugin sets `MAIN_ACTIVITY_HOST_CLASS_NAME` environment variable with the name of activity holder class name (`com.flet.serious_python_android.PythonActivity`). +* Android plugin sets `MAIN_ACTIVITY_CLASS_NAME` environment variable with a class name of an app MainActivity. +* Android plugin sets `ANDROID_NATIVE_LIBRARY_DIR` environment variable with the path to a directory containing app .so libraries. Needed for patching `ctypes.find_library`. +* Changed behavior of `SERIOUS_PYTHON_ALLOW_SOURCE_DISTRIBUTIONS` environment variable that should contain a comma-separated list of packages to allow installation from source distribution. +* Fixed: iOS `site-packages` to `xcframeworks` migration script supports both `library.so` and `library.{something}.so`. + ## 0.8.5 * Added Java `loadLibrary` to Android plugin to support `pyjnius` ([#128](https://github.com/flet-dev/serious-python/issues/128)). diff --git a/src/serious_python_windows/pubspec.yaml b/src/serious_python_windows/pubspec.yaml index 3d495e7a..e9106830 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.8.5 +version: 0.8.6 environment: sdk: '>=3.1.3 <4.0.0'