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

kivy / python-for-android / 22259302242

21 Feb 2026 03:24PM UTC coverage: 63.887% (+4.7%) from 59.214%
22259302242

Pull #3198

github

web-flow
Merge 758a52847 into 1fc026943
Pull Request #3198: Bump SDL3 (`3.4.2`) and SDL3_image (`3.4.0`) to the latest stable releases.

1823 of 3111 branches covered (58.6%)

Branch coverage included in aggregate %.

3 of 4 new or added lines in 3 files covered. (75.0%)

788 existing lines in 24 files now uncovered.

5287 of 8018 relevant lines covered (65.94%)

5.26 hits per line

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

33.96
/pythonforandroid/recipes/scipy/__init__.py
1
import os
8✔
2
from os.path import join, dirname, basename
8✔
3
from pythonforandroid.recipe import MesonRecipe, Recipe
8✔
4
from pythonforandroid.logger import warning
8✔
5
from pathlib import Path
8✔
6

7

8
class ScipyRecipe(MesonRecipe):
8✔
9

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

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

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

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

59
    def build_arch(self, arch):
8✔
60
        if arch.arch not in ["arm64-v8a", "x86_64"]:
×
61
            warning(
×
62
                "SciPy supports only 64-bit Android architectures: arm64-v8a and x86_64; skipping build."
63
            )
64
            return
×
65

UNCOV
66
        if os.name != "posix":
×
UNCOV
67
            warning("Building SciPy is only supported on Linux; skipping.")
×
68
            return
×
69

70
        super().build_arch(arch)
×
71

72

73
recipe = ScipyRecipe()
8✔
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