-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy path__init__.py
More file actions
32 lines (23 loc) · 1.17 KB
/
__init__.py
File metadata and controls
32 lines (23 loc) · 1.17 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
from os.path import join
from pythonforandroid.recipe import CppCompiledComponentsPythonRecipe
class PandasRecipe(CppCompiledComponentsPythonRecipe):
version = '1.0.3'
url = 'https://github.com/pandas-dev/pandas/releases/download/v{version}/pandas-{version}.tar.gz' # noqa
depends = ['cython', 'numpy', 'libbz2', 'liblzma']
python_depends = ['python-dateutil', 'pytz']
patches = ['fix_numpy_includes.patch']
def get_recipe_env(self, arch):
env = super().get_recipe_env(arch)
# 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",
)
# 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
recipe = PandasRecipe()