Skip to content

Commit

Permalink
scipy: update to 1.11.3
Browse files Browse the repository at this point in the history
  • Loading branch information
T-Dynamos committed Oct 30, 2023
1 parent 89a05ba commit b396fe7
Show file tree
Hide file tree
Showing 3 changed files with 1,113 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pythonforandroid/recipes/pybind11/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

class Pybind11Recipe(PythonRecipe):

version = '2.9.0'
version = '2.11.1'
url = 'https://github.com/pybind/pybind11/archive/refs/tags/v{version}.zip'
depends = ['setuptools']
call_hostpython_via_targetpython = False
Expand Down
18 changes: 14 additions & 4 deletions pythonforandroid/recipes/scipy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from pythonforandroid.recipe import CompiledComponentsPythonRecipe, Recipe
from multiprocessing import cpu_count
from os.path import join
from os import environ
from pythonforandroid.util import build_platform
import sh
from pythonforandroid.logger import shprint
from pythonforandroid.recipe import CompiledComponentsPythonRecipe, Recipe
from pythonforandroid.util import build_platform, current_directory


def arch_to_toolchain(arch):
Expand All @@ -13,12 +15,14 @@ def arch_to_toolchain(arch):

class ScipyRecipe(CompiledComponentsPythonRecipe):

version = '1.8.1'
url = f'https://github.com/scipy/scipy/releases/download/v{version}/scipy-{version}.zip'
version = 'maintenance/1.11.x'
url = 'git+https://github.com/scipy/scipy.git'
git_commit = 'b430bf54b5064465983813e2cfef3fcb86c3df07' # version 1.11.3
site_packages_name = 'scipy'
depends = ['setuptools', 'cython', 'numpy', 'lapack', 'pybind11']
call_hostpython_via_targetpython = False
need_stl_shared = True
patches = ["setup.py.patch"]

def build_compiled_components(self, arch):
self.setup_extra_args = ['-j', str(cpu_count())]
Expand All @@ -30,6 +34,12 @@ def rebuild_compiled_components(self, arch, env):
super().rebuild_compiled_components(arch, env)
self.setup_extra_args = []

def download_file(self, url, target, cwd=None):
super().download_file(url, target, cwd=cwd)
with current_directory(target):
shprint(sh.git, 'fetch', '--unshallow')
shprint(sh.git, 'checkout', self.git_commit)

def get_recipe_env(self, arch):
env = super().get_recipe_env(arch)
arch_env = arch.get_env()
Expand Down
Loading

0 comments on commit b396fe7

Please sign in to comment.