lbry-android-sdk/p4a/pythonforandroid/recipes/pyjnius/__init__.py
Akinwale Ariwodola 8b2694efb7
New build (#508)
* fix build for openssl 1.1.1b required for sdk
(cherry picked from commit aa49e3b2755b97b6331cdbbb89efc954de8d5977)

* use js code from master

* fix openssl recipe and tweak build
(cherry picked from commit 6e94c27021c7bd7b1e880c2fc314850e36a5a38e)

* remove unused build recipes
(cherry picked from commit f5c0577bdb175bfc0990602936bbc9e2052e1f25)
2019-03-30 21:58:45 +01:00

27 lines
1 KiB
Python

from pythonforandroid.recipe import CythonRecipe
from pythonforandroid.toolchain import shprint, current_directory, info
from pythonforandroid.patching import will_build
import sh
from os.path import join
class PyjniusRecipe(CythonRecipe):
# "6553ad4" is one commit after last release (1.2.0)
# it fixes method resolution, required for resolving requestPermissions()
version = '6553ad4'
url = 'https://github.com/kivy/pyjnius/archive/{version}.zip'
name = 'pyjnius'
depends = [('genericndkbuild', 'sdl2', 'sdl'), 'six']
site_packages_name = 'jnius'
patches = [('sdl2_jnienv_getter.patch', will_build('sdl2')),
('genericndkbuild_jnienv_getter.patch', will_build('genericndkbuild'))]
def postbuild_arch(self, arch):
super(PyjniusRecipe, self).postbuild_arch(arch)
info('Copying pyjnius java class to classes build dir')
with current_directory(self.get_build_dir(arch.arch)):
shprint(sh.cp, '-a', join('jnius', 'src', 'org'), self.ctx.javaclass_dir)
recipe = PyjniusRecipe()