Skip to content

Commit 9313e33

Browse files
committed
Fix numpy for ndk r19
1 parent 058f3bd commit 9313e33

File tree

4 files changed

+2
-155
lines changed

4 files changed

+2
-155
lines changed

pythonforandroid/recipes/numpy/__init__.py

Lines changed: 2 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@ class NumpyRecipe(CompiledComponentsPythonRecipe):
88
version = '1.15.1'
99
url = 'https://pypi.python.org/packages/source/n/numpy/numpy-{version}.zip'
1010
site_packages_name = 'numpy'
11-
depends = [('python2', 'python3', 'python3crystax')]
11+
depends = [('python2', 'python3', 'python3crystax'), 'setuptools']
12+
call_hostpython_via_targetpython = False
1213

1314
patches = [
1415
join('patches', 'fix-numpy.patch'),
15-
join('patches', 'prevent_libs_check.patch'),
16-
join('patches', 'ar.patch'),
1716
join('patches', 'lib.patch'),
18-
join('patches', 'python-fixes.patch')
1917
]
2018

2119
def build_compiled_components(self, arch):
@@ -28,31 +26,5 @@ def rebuild_compiled_components(self, arch, env):
2826
super(NumpyRecipe, self).rebuild_compiled_components(arch, env)
2927
self.setup_extra_args = []
3028

31-
def get_recipe_env(self, arch):
32-
env = super(NumpyRecipe, self).get_recipe_env(arch)
33-
34-
flags = " -L{} --sysroot={}".format(
35-
join(self.ctx.ndk_platform, 'usr', 'lib'),
36-
self.ctx.ndk_platform
37-
)
38-
39-
py_ver = self.ctx.python_recipe.major_minor_version_string
40-
py_inc_dir = self.ctx.python_recipe.include_root(arch.arch)
41-
py_lib_dir = self.ctx.python_recipe.link_root(arch.arch)
42-
if self.ctx.ndk == 'crystax':
43-
src_dir = join(self.ctx.ndk_dir, 'sources')
44-
flags += " -I{}".format(join(src_dir, 'crystax', 'include'))
45-
flags += " -L{}".format(join(src_dir, 'crystax', 'libs', arch.arch))
46-
flags += ' -I{}'.format(py_inc_dir)
47-
flags += ' -L{} -lpython{}'.format(py_lib_dir, py_ver)
48-
if 'python3' in self.ctx.python_recipe.name:
49-
flags += 'm'
50-
51-
if flags not in env['CC']:
52-
env['CC'] += flags
53-
if flags not in env['LD']:
54-
env['LD'] += flags + ' -shared'
55-
return env
56-
5729

5830
recipe = NumpyRecipe()

pythonforandroid/recipes/numpy/patches/ar.patch

Lines changed: 0 additions & 44 deletions
This file was deleted.

pythonforandroid/recipes/numpy/patches/prevent_libs_check.patch

Lines changed: 0 additions & 12 deletions
This file was deleted.

pythonforandroid/recipes/numpy/patches/python-fixes.patch

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy