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
29 lines (22 loc) · 1 KB
/
__init__.py
File metadata and controls
29 lines (22 loc) · 1 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
from pythonforandroid.recipe import MesonRecipe
from pythonforandroid.logger import shprint
from os.path import join
import sh
class MatplotlibRecipe(MesonRecipe):
version = '3.10.7'
url = 'https://github.com/matplotlib/matplotlib/archive/v{version}.zip'
depends = ['kiwisolver', 'numpy', 'pillow']
python_depends = ['cycler', 'fonttools', 'packaging', 'pyparsing', 'python-dateutil']
hostpython_prerequisites = ["setuptools_scm>=7"]
patches = ["meson.patch"]
need_stl_shared = True
def get_recipe_env(self, arch, **kwargs):
env = super().get_recipe_env(arch, **kwargs)
env['CXXFLAGS'] += ' -Wno-c++11-narrowing'
return env
def build_arch(self, arch):
python_path = join(self.ctx.python_recipe.get_build_dir(arch), "android-build", "python3")
self.extra_build_args += [f'-Csetup-args=-Dpython3_program={python_path}']
shprint(sh.cp, self.real_hostpython_location, python_path)
super().build_arch(arch)
recipe = MatplotlibRecipe()