8b2694efb7
* 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)
34 lines
1.2 KiB
Python
34 lines
1.2 KiB
Python
from pythonforandroid.recipe import PythonRecipe
|
|
from pythonforandroid.toolchain import current_directory, shprint
|
|
import sh
|
|
|
|
|
|
class ApswRecipe(PythonRecipe):
|
|
version = '3.15.0-r1'
|
|
url = 'https://github.com/rogerbinns/apsw/archive/{version}.tar.gz'
|
|
depends = ['sqlite3', ('python2', 'python3'), 'setuptools']
|
|
call_hostpython_via_targetpython = False
|
|
site_packages_name = 'apsw'
|
|
|
|
def build_arch(self, arch):
|
|
env = self.get_recipe_env(arch)
|
|
with current_directory(self.get_build_dir(arch.arch)):
|
|
# Build python bindings
|
|
hostpython = sh.Command(self.hostpython_location)
|
|
shprint(hostpython,
|
|
'setup.py',
|
|
'build_ext',
|
|
'--enable=fts4', _env=env)
|
|
# Install python bindings
|
|
super(ApswRecipe, self).build_arch(arch)
|
|
|
|
def get_recipe_env(self, arch):
|
|
env = super(ApswRecipe, self).get_recipe_env(arch)
|
|
sqlite_recipe = self.get_recipe('sqlite3', self.ctx)
|
|
env['CFLAGS'] += ' -I' + sqlite_recipe.get_build_dir(arch.arch)
|
|
env['LDFLAGS'] += ' -L' + sqlite_recipe.get_lib_dir(arch)
|
|
env['LIBS'] = env.get('LIBS', '') + ' -lsqlite3'
|
|
return env
|
|
|
|
|
|
recipe = ApswRecipe()
|