1
- from pythonforandroid .recipe import CompiledComponentsPythonRecipe , Recipe
2
1
from multiprocessing import cpu_count
3
2
from os .path import join
4
3
from os import environ
5
- from pythonforandroid .util import build_platform
4
+ import sh
5
+ from pythonforandroid .logger import shprint
6
+ from pythonforandroid .recipe import CompiledComponentsPythonRecipe , Recipe
7
+ from pythonforandroid .util import build_platform , current_directory
6
8
7
9
8
10
def arch_to_toolchain (arch ):
@@ -13,12 +15,14 @@ def arch_to_toolchain(arch):
13
15
14
16
class ScipyRecipe (CompiledComponentsPythonRecipe ):
15
17
16
- version = '1.8.1'
17
- url = f'https://github.com/scipy/scipy/releases/download/v{ version } /scipy-{ version } .zip'
18
+ version = 'maintenance/1.11.x'
19
+ url = 'git+https://github.com/scipy/scipy.git'
20
+ git_commit = 'b430bf54b5064465983813e2cfef3fcb86c3df07' # version 1.11.3
18
21
site_packages_name = 'scipy'
19
22
depends = ['setuptools' , 'cython' , 'numpy' , 'lapack' , 'pybind11' ]
20
23
call_hostpython_via_targetpython = False
21
24
need_stl_shared = True
25
+ patches = ["setup.py.patch" ]
22
26
23
27
def build_compiled_components (self , arch ):
24
28
self .setup_extra_args = ['-j' , str (cpu_count ())]
@@ -30,6 +34,12 @@ def rebuild_compiled_components(self, arch, env):
30
34
super ().rebuild_compiled_components (arch , env )
31
35
self .setup_extra_args = []
32
36
37
+ def download_file (self , url , target , cwd = None ):
38
+ super ().download_file (url , target , cwd = cwd )
39
+ with current_directory (target ):
40
+ shprint (sh .git , 'fetch' , '--unshallow' )
41
+ shprint (sh .git , 'checkout' , self .git_commit )
42
+
33
43
def get_recipe_env (self , arch ):
34
44
env = super ().get_recipe_env (arch )
35
45
arch_env = arch .get_env ()
0 commit comments