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

23 lines
799 B
Python
Raw Permalink Normal View History

from pythonforandroid.recipe import Recipe, CythonRecipe
2017-08-13 03:24:00 +02:00
class ShapelyRecipe(CythonRecipe):
version = '1.5'
url = 'https://github.com/Toblerity/Shapely/archive/master.zip'
depends = ['setuptools', 'libgeos']
2017-08-13 03:24:00 +02:00
call_hostpython_via_targetpython = False
patches = ['setup.patch'] # Patch to force setup to fail when C extention fails to build
2017-08-13 03:24:00 +02:00
# setup_extra_args = ['sdist'] # DontForce Cython
2017-08-13 03:24:00 +02:00
def get_recipe_env(self, arch, with_flags_in_cc=True):
""" Add libgeos headers to path """
env = super(ShapelyRecipe, self).get_recipe_env(arch, with_flags_in_cc)
2017-08-13 03:24:00 +02:00
libgeos_dir = Recipe.get_recipe('libgeos', self.ctx).get_build_dir(arch.arch)
env['CFLAGS'] += " -I{}/dist/include".format(libgeos_dir)
return env
2017-08-13 03:24:00 +02:00
recipe = ShapelyRecipe()