|
9 | 9 |
|
10 | 10 | class NumpyRecipe(CompiledComponentsPythonRecipe): |
11 | 11 |
|
12 | | - version = '1.18.1' |
| 12 | + version = '1.22.3' |
13 | 13 | url = 'https://pypi.python.org/packages/source/n/numpy/numpy-{version}.zip' |
14 | 14 | site_packages_name = 'numpy' |
15 | 15 | depends = ['setuptools', 'cython'] |
16 | 16 | install_in_hostpython = True |
17 | 17 | call_hostpython_via_targetpython = False |
18 | 18 |
|
19 | 19 | patches = [ |
20 | | - join('patches', 'hostnumpy-xlocale.patch'), |
21 | | - join('patches', 'remove-default-paths.patch'), |
22 | | - join('patches', 'add_libm_explicitly_to_build.patch'), |
23 | | - join('patches', 'compiler_cxx_fix.patch'), |
24 | | - ] |
| 20 | + join("patches", "remove-default-paths.patch"), |
| 21 | + join("patches", "add_libm_explicitly_to_build.patch"), |
| 22 | + ] |
| 23 | + |
| 24 | + def get_recipe_env(self, arch=None, with_flags_in_cc=True): |
| 25 | + env = super().get_recipe_env(arch, with_flags_in_cc) |
| 26 | + |
| 27 | + # _PYTHON_HOST_PLATFORM declares that we're cross-compiling |
| 28 | + # and avoids issues when building on macOS for Android targets. |
| 29 | + env["_PYTHON_HOST_PLATFORM"] = arch.command_prefix |
| 30 | + |
| 31 | + # NPY_DISABLE_SVML=1 allows numpy to build for non-AVX512 CPUs |
| 32 | + # See: https://github.com/numpy/numpy/issues/21196 |
| 33 | + env["NPY_DISABLE_SVML"] = "1" |
| 34 | + |
| 35 | + return env |
25 | 36 |
|
26 | 37 | def _build_compiled_components(self, arch): |
27 | 38 | info('Building compiled components in {}'.format(self.name)) |
|
0 commit comments