Skip to content

Commit d9ac886

Browse files
iOS/Android fixes and new environment variables (#130)
* iOS packaging match both something.*.so and something.so * Configure NATIVE_LIBRARY_DIR and MAIN_ACTIVITY_CLASS_NAME env vars * Added com.flet.serious_python_android.PythonActivity * Changed behavior of SERIOUS_PYTHON_ALLOW_SOURCE_DISTRIBUTIONS * run_example update * Version bumped to 0.8.6 * Updated changlelog
1 parent 79683d7 commit d9ac886

File tree

25 files changed

+166
-89
lines changed

25 files changed

+166
-89
lines changed

src/serious_python/CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 0.8.6
2+
3+
* Added `com.flet.serious_python_android.PythonActivity` holder class with `mActivity` holding a reference to an app MainActivity. Needed for `plyer`.
4+
* Android plugin sets `MAIN_ACTIVITY_HOST_CLASS_NAME` environment variable with the name of activity holder class name (`com.flet.serious_python_android.PythonActivity`).
5+
* Android plugin sets `MAIN_ACTIVITY_CLASS_NAME` environment variable with a class name of an app MainActivity.
6+
* 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`.
7+
* 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.
8+
* Fixed: iOS `site-packages` to `xcframeworks` migration script supports both `library.so` and `library.{something}.so`.
9+
110
## 0.8.5
211

312
* Added Java `loadLibrary` to Android plugin to support `pyjnius` ([#128](https://github.com/flet-dev/serious-python/issues/128)).

src/serious_python/bin/package_command.dart

+8-3
Original file line numberDiff line numberDiff line change
@@ -303,10 +303,15 @@ class PackageCommand extends Command {
303303

304304
List<String> pipArgs = ["--disable-pip-version-check"];
305305

306-
if ((isMobile || isWeb) &&
307-
!Platform.environment
308-
.containsKey(allowSourceDistrosEnvironmentVariable)) {
306+
if (isMobile || isWeb) {
309307
pipArgs.addAll(["--only-binary", ":all:"]);
308+
if (Platform.environment
309+
.containsKey(allowSourceDistrosEnvironmentVariable)) {
310+
pipArgs.addAll([
311+
"--no-binary",
312+
Platform.environment[allowSourceDistrosEnvironmentVariable]!
313+
]);
314+
}
310315
}
311316

312317
for (var index in extraPyPiIndexes) {

src/serious_python/example/flask_example/pubspec.lock

+18-18
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,18 @@ packages:
127127
dependency: transitive
128128
description:
129129
name: leak_tracker
130-
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
130+
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
131131
url: "https://pub.dev"
132132
source: hosted
133-
version: "10.0.5"
133+
version: "10.0.4"
134134
leak_tracker_flutter_testing:
135135
dependency: transitive
136136
description:
137137
name: leak_tracker_flutter_testing
138-
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
138+
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
139139
url: "https://pub.dev"
140140
source: hosted
141-
version: "3.0.5"
141+
version: "3.0.3"
142142
leak_tracker_testing:
143143
dependency: transitive
144144
description:
@@ -167,18 +167,18 @@ packages:
167167
dependency: transitive
168168
description:
169169
name: material_color_utilities
170-
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
170+
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
171171
url: "https://pub.dev"
172172
source: hosted
173-
version: "0.11.1"
173+
version: "0.8.0"
174174
meta:
175175
dependency: transitive
176176
description:
177177
name: meta
178-
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
178+
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
179179
url: "https://pub.dev"
180180
source: hosted
181-
version: "1.15.0"
181+
version: "1.12.0"
182182
path:
183183
dependency: transitive
184184
description:
@@ -265,42 +265,42 @@ packages:
265265
path: "../.."
266266
relative: true
267267
source: path
268-
version: "0.8.0"
268+
version: "0.8.6"
269269
serious_python_android:
270270
dependency: transitive
271271
description:
272272
path: "../../../serious_python_android"
273273
relative: true
274274
source: path
275-
version: "0.8.0"
275+
version: "0.8.6"
276276
serious_python_darwin:
277277
dependency: transitive
278278
description:
279279
path: "../../../serious_python_darwin"
280280
relative: true
281281
source: path
282-
version: "0.8.0"
282+
version: "0.8.6"
283283
serious_python_linux:
284284
dependency: transitive
285285
description:
286286
path: "../../../serious_python_linux"
287287
relative: true
288288
source: path
289-
version: "0.8.0"
289+
version: "0.8.6"
290290
serious_python_platform_interface:
291291
dependency: transitive
292292
description:
293293
path: "../../../serious_python_platform_interface"
294294
relative: true
295295
source: path
296-
version: "0.8.0"
296+
version: "0.8.6"
297297
serious_python_windows:
298298
dependency: transitive
299299
description:
300300
path: "../../../serious_python_windows"
301301
relative: true
302302
source: path
303-
version: "0.8.0"
303+
version: "0.8.6"
304304
shelf:
305305
dependency: transitive
306306
description:
@@ -358,10 +358,10 @@ packages:
358358
dependency: transitive
359359
description:
360360
name: test_api
361-
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
361+
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
362362
url: "https://pub.dev"
363363
source: hosted
364-
version: "0.7.2"
364+
version: "0.7.0"
365365
toml:
366366
dependency: transitive
367367
description:
@@ -390,10 +390,10 @@ packages:
390390
dependency: transitive
391391
description:
392392
name: vm_service
393-
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
393+
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
394394
url: "https://pub.dev"
395395
source: hosted
396-
version: "14.2.5"
396+
version: "14.2.1"
397397
web:
398398
dependency: transitive
399399
description:

src/serious_python/example/flet_example/pubspec.lock

+24-24
Original file line numberDiff line numberDiff line change
@@ -264,18 +264,18 @@ packages:
264264
dependency: transitive
265265
description:
266266
name: leak_tracker
267-
sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05"
267+
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
268268
url: "https://pub.dev"
269269
source: hosted
270-
version: "10.0.5"
270+
version: "10.0.4"
271271
leak_tracker_flutter_testing:
272272
dependency: transitive
273273
description:
274274
name: leak_tracker_flutter_testing
275-
sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806"
275+
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
276276
url: "https://pub.dev"
277277
source: hosted
278-
version: "3.0.5"
278+
version: "3.0.3"
279279
leak_tracker_testing:
280280
dependency: transitive
281281
description:
@@ -320,18 +320,18 @@ packages:
320320
dependency: transitive
321321
description:
322322
name: material_color_utilities
323-
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
323+
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
324324
url: "https://pub.dev"
325325
source: hosted
326-
version: "0.11.1"
326+
version: "0.8.0"
327327
meta:
328328
dependency: transitive
329329
description:
330330
name: meta
331-
sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7
331+
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
332332
url: "https://pub.dev"
333333
source: hosted
334-
version: "1.15.0"
334+
version: "1.12.0"
335335
package_info_plus:
336336
dependency: "direct main"
337337
description:
@@ -424,10 +424,10 @@ packages:
424424
dependency: transitive
425425
description:
426426
name: platform
427-
sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65"
427+
sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
428428
url: "https://pub.dev"
429429
source: hosted
430-
version: "3.1.5"
430+
version: "3.1.4"
431431
plugin_platform_interface:
432432
dependency: transitive
433433
description:
@@ -482,42 +482,42 @@ packages:
482482
path: "../.."
483483
relative: true
484484
source: path
485-
version: "0.8.4"
485+
version: "0.8.6"
486486
serious_python_android:
487487
dependency: transitive
488488
description:
489489
path: "../../../serious_python_android"
490490
relative: true
491491
source: path
492-
version: "0.8.4"
492+
version: "0.8.6"
493493
serious_python_darwin:
494494
dependency: transitive
495495
description:
496496
path: "../../../serious_python_darwin"
497497
relative: true
498498
source: path
499-
version: "0.8.4"
499+
version: "0.8.6"
500500
serious_python_linux:
501501
dependency: transitive
502502
description:
503503
path: "../../../serious_python_linux"
504504
relative: true
505505
source: path
506-
version: "0.8.4"
506+
version: "0.8.6"
507507
serious_python_platform_interface:
508508
dependency: transitive
509509
description:
510510
path: "../../../serious_python_platform_interface"
511511
relative: true
512512
source: path
513-
version: "0.8.4"
513+
version: "0.8.6"
514514
serious_python_windows:
515515
dependency: transitive
516516
description:
517517
path: "../../../serious_python_windows"
518518
relative: true
519519
source: path
520-
version: "0.8.4"
520+
version: "0.8.6"
521521
shared_preferences:
522522
dependency: transitive
523523
description:
@@ -639,10 +639,10 @@ packages:
639639
dependency: transitive
640640
description:
641641
name: test_api
642-
sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb"
642+
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
643643
url: "https://pub.dev"
644644
source: hosted
645-
version: "0.7.2"
645+
version: "0.7.0"
646646
toml:
647647
dependency: transitive
648648
description:
@@ -671,10 +671,10 @@ packages:
671671
dependency: transitive
672672
description:
673673
name: url_launcher_android
674-
sha256: e35a698ac302dd68e41f73250bd9517fe3ab5fa4f18fe4647a0872db61bacbab
674+
sha256: f0c73347dfcfa5b3db8bc06e1502668265d39c08f310c29bff4e28eea9699f79
675675
url: "https://pub.dev"
676676
source: hosted
677-
version: "6.3.10"
677+
version: "6.3.9"
678678
url_launcher_ios:
679679
dependency: transitive
680680
description:
@@ -767,10 +767,10 @@ packages:
767767
dependency: transitive
768768
description:
769769
name: vm_service
770-
sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d"
770+
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
771771
url: "https://pub.dev"
772772
source: hosted
773-
version: "14.2.5"
773+
version: "14.2.1"
774774
web:
775775
dependency: transitive
776776
description:
@@ -836,5 +836,5 @@ packages:
836836
source: hosted
837837
version: "6.5.0"
838838
sdks:
839-
dart: ">=3.5.0 <4.0.0"
840-
flutter: ">=3.24.0"
839+
dart: ">=3.4.0 <4.0.0"
840+
flutter: ">=3.22.0"
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
081229a0c5551f4c29faa2b6e8a23cba9e971d66f95565892561898e146a5d5e
1+
eb21e6e3680f591dc1c2a20e8ef88b69cffdf67f724e3a938f8aa8a759acb036

src/serious_python/example/run_example/app/src/main.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ def test_numpy_performance():
8787

8888
def test_sqlite():
8989
try:
90-
import ctypes
90+
# import ctypes
9191

92-
ctypes.cdll.LoadLibrary("libsqlite3_python.so")
92+
# ctypes.cdll.LoadLibrary("libsqlite3_python.so")
9393
import sqlite3
9494

9595
out_dir = Path(result_filename).parent
@@ -161,8 +161,8 @@ def test_pyjnius():
161161

162162

163163
r += test_sqlite()
164-
r += test_pyjnius()
165-
# test_lru()
164+
# r += test_pyjnius()
165+
test_lru()
166166
# test_numpy_basic()
167167
# test_numpy_performance()
168168

Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
#numpy
22
lru-dict
3-
pyjnius
3+
#pyjnius
4+
flet-libsodium
5+
pysodium
6+
#supabase

src/serious_python/example/run_example/ios/Podfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PODS:
55
- path_provider_foundation (0.0.1):
66
- Flutter
77
- FlutterMacOS
8-
- serious_python_darwin (0.8.0):
8+
- serious_python_darwin (0.8.5):
99
- Flutter
1010
- FlutterMacOS
1111

@@ -29,7 +29,7 @@ SPEC CHECKSUMS:
2929
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
3030
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
3131
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
32-
serious_python_darwin: 351e50099cb9e34f344f75af29b1d36d3c0922f2
32+
serious_python_darwin: 190aa70fd014e151039f01cc14eefb4408eeb724
3333

3434
PODFILE CHECKSUM: a57f30d18f102dd3ce366b1d62a55ecbef2158e5
3535

0 commit comments

Comments
 (0)