lbry-android-sdk/p4a/pythonforandroid/recipes/pyleveldb/__init__.py

28 lines
929 B
Python
Raw Normal View History

from pythonforandroid.recipe import CppCompiledComponentsPythonRecipe
2017-08-13 03:24:00 +02: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()