8000 Pyjnius's recipe for python 2.7.11 · opacam/python-for-android@b38b44d · GitHub
[go: up one dir, main page]

Skip to content

Commit b38b44d

Browse files
author
Pol Canelles
committed
Pyjnius's recipe for python 2.7.11
1 parent 52f2478 commit b38b44d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pythonforandroid/recipes/pyjnius/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,22 @@ class PyjniusRecipe(CythonRecipe):
1111
name = 'pyjnius'
1212
depends = [('python2', 'python3crystax'), ('sdl2', 'sdl', 'webviewjni'), 'six']
1313
site_packages_name = 'jnius'
14-
1514
patches = [('sdl2_jnienv_getter.patch', will_build('sdl2')),
1615
('webviewjni_jnienv_getter.patch', will_build('webviewjni'))]
16+
call_hostpython_via_targetpython = False
1717

1818
def postbuild_arch(self, arch):
1919
super(PyjniusRecipe, self).postbuild_arch(arch)
2020
info('Copying pyjnius java class to classes build dir')
2121
with current_directory(self.get_build_dir(arch.arch)):
2222
shprint(sh.cp, '-a', join('jnius', 'src', 'org'), self.ctx.javaclass_dir)
2323

24+
def get_recipe_env(self, arch=None):
25+
env = super(PyjniusRecipe, self).get_recipe_env(arch)
26+
env['PYTHON_ROOT'] = self.ctx.get_python_install_dir()
27+
env['CFLAGS'] += ' -I' + env['PYTHON_ROOT'] + '/include/python2.7'
28+
env['LDFLAGS'] += ' -L' + env['PYTHON_ROOT'] + '/lib' + \
29+
' -lpython2.7'
30+
return env
2431

2532
recipe = PyjniusRecipe()

0 commit comments

Comments
 (0)
0