2019-03-30 21:58:45 +01:00
|
|
|
from pythonforandroid.recipe import CppCompiledComponentsPythonRecipe
|
2017-08-13 03:24:00 +02:00
|
|
|
|
2019-03-30 21:58:45 +01:00
|
|
|
|
|
|
|
class PyLevelDBRecipe(CppCompiledComponentsPythonRecipe):
|
2022-12-02 21:15:34 +01:00
|
|
|
version = '0.194'
|
|
|
|
url = ('https://pypi.python.org/packages/source/l/leveldb/'
|
|
|
|
'leveldb-{version}.tar.gz')
|
|
|
|
depends = ['snappy', 'leveldb', 'setuptools']
|
2017-08-13 03:24:00 +02:00
|
|
|
patches = ['bindings-only.patch']
|
|
|
|
site_packages_name = 'leveldb'
|
|
|
|
|
2022-12-02 21:15:34 +01:00
|
|
|
def get_recipe_env(self, arch):
|
|
|
|
env = super().get_recipe_env(arch)
|
|
|
|
|
|
|
|
snappy_recipe = self.get_recipe('snappy', self.ctx)
|
|
|
|
leveldb_recipe = self.get_recipe('leveldb', self.ctx)
|
|
|
|
|
|
|
|
env["LDFLAGS"] += " -L" + snappy_recipe.get_build_dir(arch.arch)
|
|
|
|
env["LDFLAGS"] += " -L" + leveldb_recipe.get_build_dir(arch.arch)
|
|
|
|
|
|
|
|
env["SNAPPY_BUILD_PATH"] = snappy_recipe.get_build_dir(arch.arch)
|
|
|
|
env["LEVELDB_BUILD_PATH"] = leveldb_recipe.get_build_dir(arch.arch)
|
|
|
|
|
|
|
|
return env
|
|
|
|
|
2017-08-13 03:24:00 +02:00
|
|
|
|
|
|
|
recipe = PyLevelDBRecipe()
|