1
1
from pythonforandroid .recipe import CompiledComponentsPythonRecipe
2
+ from multiprocessing import cpu_count
2
3
from os .path import join
3
4
4
5
@@ -7,7 +8,6 @@ class NumpyRecipe(CompiledComponentsPythonRecipe):
7
8
version = '1.15.1'
8
9
url = 'https://pypi.python.org/packages/source/n/numpy/numpy-{version}.zip'
9
10
site_packages_name = 'numpy'
10
-
11
11
depends = [('python2' , 'python3' , 'python3crystax' )]
12
12
13
13
patches = [
@@ -18,6 +18,16 @@ class NumpyRecipe(CompiledComponentsPythonRecipe):
18
18
join ('patches' , 'python-fixes.patch' )
19
19
]
20
20
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
+
21
31
def get_recipe_env (self , arch ):
22
32
env = super (NumpyRecipe , self ).get_recipe_env (arch )
23
33
@@ -44,8 +54,5 @@ def get_recipe_env(self, arch):
44
54
env ['LD' ] += flags + ' -shared'
45
55
return env
46
56
47
- def prebuild_arch (self , arch ):
48
- super (NumpyRecipe , self ).prebuild_arch (arch )
49
-
50
57
51
58
recipe = NumpyRecipe ()
0 commit comments