11from pythonforandroid .recipe import CompiledComponentsPythonRecipe
2+ from multiprocessing import cpu_count
23from os .path import join
34
45
@@ -7,7 +8,6 @@ class NumpyRecipe(CompiledComponentsPythonRecipe):
78 version = '1.15.1'
89 url = 'https://pypi.python.org/packages/source/n/numpy/numpy-{version}.zip'
910 site_packages_name = 'numpy'
10-
1111 depends = [('python2' , 'python3' , 'python3crystax' )]
1212
1313 patches = [
@@ -18,6 +18,16 @@ class NumpyRecipe(CompiledComponentsPythonRecipe):
1818 join ('patches' , 'python-fixes.patch' )
1919 ]
2020
21+ def build_compiled_components (self , arch ):
22+ self .setup_extra_args = ['-j' , str (cpu_count ())]
23+ super (NumpyRecipe , self ).build_compiled_components (arch )
24+ self .setup_extra_args = []
25+
26+ def rebuild_compiled_components (self , arch , env ):
27+ self .setup_extra_args = ['-j' , str (cpu_count ())]
28+ super (NumpyRecipe , self ).rebuild_compiled_components (arch , env )
29+ self .setup_extra_args = []
30+
2131 def get_recipe_env (self , arch ):
2232 env = super (NumpyRecipe , self ).get_recipe_env (arch )
2333
@@ -44,8 +54,5 @@ def get_recipe_env(self, arch):
4454 env ['LD' ] += flags + ' -shared'
4555 return env
4656
47- def prebuild_arch (self , arch ):
48- super (NumpyRecipe , self ).prebuild_arch (arch )
49-
5057
5158recipe = NumpyRecipe ()
0 commit comments