Skip to content

Commit be10c02

Browse files
authored
Merge pull request #1 from adin234/scipy
better recipe names, imports
2 parents 0276d03 + 7ed787a commit be10c02

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

pythonforandroid/recipes/lapack/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
from pythonforandroid.recipe import Recipe
22
from pythonforandroid.logger import shprint
3-
from pythonforandroid.util import current_directory, ensure_dir
3+
from pythonforandroid.util import current_directory, ensure_dir, BuildInterruptingException
44
from multiprocessing import cpu_count
55
from os.path import join
66
import sh
77

88

9-
class This(Recipe):
9+
class LapackRecipe(Recipe):
1010

1111
name = 'lapack'
1212
version = 'v3.9.0'
@@ -21,7 +21,7 @@ def get_recipe_env(self, arch):
2121
FC = f"{env['TOOLCHAIN_PREFIX']}-gfortran"
2222
env['FC'] = f'{FC} --sysroot={sysroot}'
2323
if sh.which(FC) is None:
24-
raise Exception(f"{FC} not found. See https://github.com/mzakharo/android-gfortran")
24+
raise BuildInterruptingException(f"{FC} not found. See https://github.com/mzakharo/android-gfortran")
2525
return env
2626

2727
def build_arch(self, arch):
@@ -50,4 +50,4 @@ def build_arch(self, arch):
5050
shprint(sh.make, 'install', _env=env)
5151

5252

53-
recipe = This()
53+
recipe = LapackRecipe()

pythonforandroid/recipes/numpy/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
from pythonforandroid.recipe import CompiledComponentsPythonRecipe, sh, info, current_directory, shprint
1+
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
2+
from pythonforandroid.logger import shprint, info
3+
from pythonforandroid.util import current_directory
24
from multiprocessing import cpu_count
35
from os.path import join
46
import glob
7+
import sh
58

69

710
class NumpyRecipe(CompiledComponentsPythonRecipe):

pythonforandroid/recipes/scipy/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from os.path import join
44

55

6-
class ThisRecipe(CompiledComponentsPythonRecipe):
6+
class ScipyRecipe(CompiledComponentsPythonRecipe):
77

88
version = '1.5.4'
99
url = f'https://github.com/scipy/scipy/releases/download/v{version}/scipy-{version}.zip'
@@ -46,4 +46,4 @@ def get_recipe_env(self, arch):
4646
return env
4747

4848

49-
recipe = ThisRecipe()
49+
recipe = ScipyRecipe()

0 commit comments

Comments
 (0)