Skip to content

Commit 38cdc93

Browse files
committed
Make python2 use our libffi library in case that is present in our requirements
This is only necessary for python2 because in python3 the configure option that we use in python2 has been removed
1 parent e0a63f5 commit 38cdc93

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pythonforandroid/recipes/python2/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ def prebuild_arch(self, arch):
5656

5757
def set_libs_flags(self, env, arch):
5858
env = super(Python2Recipe, self).set_libs_flags(env, arch)
59+
if 'libffi' in self.ctx.recipe_build_order:
60+
# For python2 we need to tell configure that we want to use our
61+
# compiled libffi, this step is not necessary for python3.
62+
self.configure_args += ('--with-system-ffi',)
63+
5964
if 'openssl' in self.ctx.recipe_build_order:
6065
recipe = Recipe.get_recipe('openssl', self.ctx)
6166
openssl_build = recipe.get_build_dir(arch.arch)

0 commit comments

Comments
 (0)