From b38b44db2f7bfdafe243db9833dd84fb053aa852 Mon Sep 17 00:00:00 2001 From: Pol Canelles Date: Fri, 10 Jun 2016 19:45:26 +0200 Subject: [PATCH 1/2] Pyjnius's recipe for python 2.7.11 --- pythonforandroid/recipes/pyjnius/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pythonforandroid/recipes/pyjnius/__init__.py b/pythonforandroid/recipes/pyjnius/__init__.py index ee4ba699bd..8ab5215ea2 100644 --- a/pythonforandroid/recipes/pyjnius/__init__.py +++ b/pythonforandroid/recipes/pyjnius/__init__.py @@ -11,9 +11,9 @@ class PyjniusRecipe(CythonRecipe): name = 'pyjnius' depends = [('python2', 'python3crystax'), ('sdl2', 'sdl', 'webviewjni'), 'six'] site_packages_name = 'jnius' - patches = [('sdl2_jnienv_getter.patch', will_build('sdl2')), ('webviewjni_jnienv_getter.patch', will_build('webviewjni'))] + call_hostpython_via_targetpython = False def postbuild_arch(self, arch): super(PyjniusRecipe, self).postbuild_arch(arch) @@ -21,5 +21,12 @@ def postbuild_arch(self, arch): with current_directory(self.get_build_dir(arch.arch)): shprint(sh.cp, '-a', join('jnius', 'src', 'org'), self.ctx.javaclass_dir) + def get_recipe_env(self, arch=None): + env = super(PyjniusRecipe, self).get_recipe_env(arch) + env['PYTHON_ROOT'] = self.ctx.get_python_install_dir() + env['CFLAGS'] += ' -I' + env['PYTHON_ROOT'] + '/include/python2.7' + env['LDFLAGS'] += ' -L' + env['PYTHON_ROOT'] + '/lib' + \ + ' -lpython2.7' + return env recipe = PyjniusRecipe() From 6402f7df7bba79162b364b4fc32f96358ff242ab Mon Sep 17 00:00:00 2001 From: Pol Canelles Date: Thu, 16 Jun 2016 12:56:09 +0200 Subject: [PATCH 2/2] Removes the include and link paths for python2 --- pythonforandroid/recipes/pyjnius/__init__.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/pythonforandroid/recipes/pyjnius/__init__.py b/pythonforandroid/recipes/pyjnius/__init__.py index 8ab5215ea2..c8c2a7e32d 100644 --- a/pythonforandroid/recipes/pyjnius/__init__.py +++ b/pythonforandroid/recipes/pyjnius/__init__.py @@ -21,12 +21,4 @@ def postbuild_arch(self, arch): with current_directory(self.get_build_dir(arch.arch)): shprint(sh.cp, '-a', join('jnius', 'src', 'org'), self.ctx.javaclass_dir) - def get_recipe_env(self, arch=None): - env = super(PyjniusRecipe, self).get_recipe_env(arch) - env['PYTHON_ROOT'] = self.ctx.get_python_install_dir() - env['CFLAGS'] += ' -I' + env['PYTHON_ROOT'] + '/include/python2.7' - env['LDFLAGS'] += ' -L' + env['PYTHON_ROOT'] + '/lib' + \ - ' -lpython2.7' - return env - recipe = PyjniusRecipe()