Skip to content

Commit f93e955

Browse files
author
lanmao
committed
Fix tflite-runtime numpy include path
1 parent 869c74b commit f93e955

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

pythonforandroid/recipes/tflite-runtime/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from pythonforandroid.recipe import PythonRecipe, current_directory, \
22
shprint, info_main, warning
33
from pythonforandroid.logger import error
4-
from os.path import join
4+
from os.path import exists, join
55
import sh
66

77

@@ -61,7 +61,10 @@ def build_arch(self, arch):
6161
pybind11_recipe = self.get_recipe('pybind11', self.ctx)
6262
pybind11_include_dir = pybind11_recipe.get_include_dir(arch)
6363
numpy_include_dir = join(self.ctx.get_site_packages_dir(arch),
64-
'numpy', 'core', 'include')
64+
'numpy', '_core', 'include')
65+
if not exists(numpy_include_dir):
66+
numpy_include_dir = join(self.ctx.get_site_packages_dir(arch),
67+
'numpy', 'core', 'include')
6568
includes = ' -I' + python_include_dir + \
6669
' -I' + numpy_include_dir + \
6770
' -I' + pybind11_include_dir

0 commit comments

Comments
 (0)