We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e90999 commit eff95e9Copy full SHA for eff95e9
1 file changed
recipes/cryptography/__init__.py
@@ -0,0 +1,26 @@
1
+# Workaround for `ImportError: dlopen failed: cannot locate symbol`
2
+# https://github.com/kivy/python-for-android/issues/3329
3
+
4
+from pythonforandroid.recipes.cryptography import (
5
+ CryptographyRecipe as UpstreamCryptographyRecipe,
6
+)
7
8
9
+class CryptographyRecipe(UpstreamCryptographyRecipe):
10
+ def get_recipe_env(self, arch, **kwargs):
11
+ env = super().get_recipe_env(arch, **kwargs)
12
13
+ python_link_version = self.ctx.python_recipe.link_version
14
+ link_arg = f"-Clink-arg=-lpython{python_link_version}"
15
16
+ rustflags = env.get("RUSTFLAGS", "").split()
17
18
+ if link_arg not in rustflags:
19
+ rustflags.append(link_arg)
20
21
+ env["RUSTFLAGS"] = " ".join(rustflags)
22
23
+ return env
24
25
26
+recipe = CryptographyRecipe()
0 commit comments