• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

kivy / python-for-android / 14999495895

13 May 2025 02:38PM UTC coverage: 58.724% (-0.5%) from 59.204%
14999495895

Pull #3136

github

web-flow
Merge 55a9af12f into 40993e323
Pull Request #3136: scipy: update to v1.15.2

1059 of 2408 branches covered (43.98%)

Branch coverage included in aggregate %.

73 of 221 new or added lines in 9 files covered. (33.03%)

4 existing lines in 3 files now uncovered.

4979 of 7874 relevant lines covered (63.23%)

2.52 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

38.46
/pythonforandroid/recipes/scipy/__init__.py
1
from os.path import join, dirname, basename
4✔
2
from pythonforandroid.recipe import MesonRecipe, Recipe
4✔
3
from pathlib import Path
4✔
4

5

6
class ScipyRecipe(MesonRecipe):
4✔
7

8
    version = "v1.15.2"
4✔
9
    url = "git+https://github.com/scipy/scipy.git"
4✔
10
    depends = ["numpy", "libopenblas", "fortran"]
4✔
11
    need_stl_shared = True
4✔
12
    meson_version = "1.5.0"
4✔
13
    hostpython_prerequisites = ["numpy", "Cython>=3.0.8"]
4✔
14
    patches = ["meson.patch"]
4✔
15

16
    def get_recipe_meson_options(self, arch):
4✔
NEW
17
        options = super().get_recipe_meson_options(arch)
×
NEW
18
        options["binaries"]["python"] = self.ctx.python_recipe.python_exe
×
NEW
19
        options["binaries"]["fortran"] = self.place_wrapper(arch)
×
NEW
20
        options["properties"]["numpy-include-dir"] = join(
×
21
            self.ctx.get_python_install_dir(arch.arch), "numpy/_core/include"
22
        )
NEW
23
        self.ensure_args(
×
24
            "-Csetup-args=-Dblas=openblas",
25
            "-Csetup-args=-Dlapack=openblas",
26
            f"-Csetup-args=-Dopenblas_libdir={self.ctx.get_libs_dir(arch.arch)}",
27
            f'-Csetup-args=-Dopenblas_incldir={join(Recipe.get_recipe("libopenblas", self.ctx).get_build_dir(arch.arch), "build")}',
28
            "-Csetup-args=-Duse-pythran=false",
29
        )
NEW
30
        return options
×
31

32
    def place_wrapper(self, arch):
4✔
NEW
33
        compiler = Recipe.get_recipe("fortran", self.ctx).get_fortran_bin(arch.arch)
×
NEW
34
        file = join(self.get_recipe_dir(), "wrapper.py")
×
NEW
35
        with open(file, "r") as _file:
×
NEW
36
            data = _file.read()
×
NEW
37
            _file.close()
×
NEW
38
        data = data.replace("@COMPILER@", compiler)
×
39
        # custom compiler
40
        # taken from: https://github.com/termux/termux-packages/blob/master/packages/python-scipy/
NEW
41
        m_compiler = Path(join(dirname(compiler), basename(compiler) + "-scipy"))
×
NEW
42
        m_compiler.write_text(data)
×
NEW
43
        m_compiler.chmod(0o755)
×
NEW
44
        self.patch_shebang(str(m_compiler), self.real_hostpython_location)
×
NEW
45
        return str(m_compiler)
×
46

47
    def get_recipe_env(self, arch, **kwargs):
4✔
NEW
48
        env = super().get_recipe_env(arch, **kwargs)
×
UNCOV
49
        arch_env = arch.get_env()
×
NEW
50
        env["LDFLAGS"] = arch_env["LDFLAGS"]
×
NEW
51
        env["LDFLAGS"] += " -L{} -lpython{}".format(
×
52
            self.ctx.python_recipe.link_root(arch.arch),
53
            self.ctx.python_recipe.link_version,
54
        )
UNCOV
55
        return env
×
56

57

58
recipe = ScipyRecipe()
4✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc