forked from kivy/python-for-android
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path__init__.py
More file actions
37 lines (29 loc) · 1.42 KB
/
__init__.py
File metadata and controls
37 lines (29 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from os.path import join
from pythonforandroid.recipe import MesonRecipe
class PandasRecipe(MesonRecipe):
version = 'v2.3.0'
url = 'git+https://github.com/pandas-dev/pandas'
depends = ['numpy', 'libbz2', 'liblzma']
hostpython_prerequisites = ["Cython<4.0.0a0", "versioneer", "numpy"] # meson does not detects venv's cython
patches = ['fix_numpy_includes.patch']
python_depends = ['python-dateutil', 'pytz']
need_stl_shared = True
def get_recipe_env(self, arch, **kwargs):
env = super().get_recipe_env(arch, **kwargs)
# we need the includes from our installed numpy at site packages
# because we need some includes generated at numpy's compile time
env['NUMPY_INCLUDES'] = join(
self.ctx.get_python_install_dir(arch.arch), "numpy/_core/include",
)
env["PYTHON_INCLUDE_DIR"] = self.ctx.python_recipe.include_root(arch)
# this flag below is to fix a runtime error:
# ImportError: dlopen failed: cannot locate symbol
# "_ZTVSt12length_error" referenced by
# "/data/data/org.test.matplotlib_testapp/files/app/_python_bundle
# /site-packages/pandas/_libs/window/aggregations.so"...
env['LDFLAGS'] += f' -landroid -l{self.stl_lib_name}'
return env
def build_arch(self, arch):
super().build_arch(arch)
self.restore_hostpython_prerequisites(["cython"])
recipe = PandasRecipe()