Skip to content

Commit 67d2108

Browse files
committed
v0.1.3: Add app's path to PYTHONPATH
1 parent 6506c82 commit 67d2108

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.1.3
2+
3+
* Add app's path to `PYTHONPATH`.
4+
15
## 0.1.2
26

37
* Package dist `site-packages` to a zip, so publishing to App Store doesn't fail.

ios/Classes/SeriousPythonPlugin.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ public class SeriousPythonPlugin: NSObject, FlutterPlugin {
2929
guard let resourcePath = Bundle(for: type(of: self)).resourcePath else { return }
3030

3131
let pythonPaths: [String] = modulePaths + [
32+
appDir,
3233
"\(appDir)/__pypackages__",
3334
resourcePath,
34-
"\(resourcePath)/lib/python3.10",
35-
"\(resourcePath)/lib/site-packages.zip"
35+
"\(resourcePath)/lib/site-packages.zip",
36+
"\(resourcePath)/lib/python3.10"
3637
]
3738

3839
setenv("PYTHONINSPECT", "1", 1)

pubspec.yaml

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

77
platforms:
88
ios:

0 commit comments

Comments
 (0)