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

kivy / python-for-android / 14561414518

20 Apr 2025 04:39PM UTC coverage: 58.861% (-0.3%) from 59.204%
14561414518

Pull #3136

github

web-flow
Merge bce0f1307 into f491c6eb2
Pull Request #3136: scipy: update to v1.15.2

1059 of 2398 branches covered (44.16%)

Branch coverage included in aggregate %.

72 of 221 new or added lines in 9 files covered. (32.58%)

4 existing lines in 3 files now uncovered.

4979 of 7860 relevant lines covered (63.35%)

2.52 hits per line

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

48.39
/pythonforandroid/recipes/numpy/__init__.py
1
from pythonforandroid.recipe import Recipe, MesonRecipe
4✔
2
from os.path import join
4✔
3
import shutil
4✔
4

5

6
class NumpyRecipe(MesonRecipe):
4✔
7
    version = 'v2.2.4'
4✔
8
    url = 'git+https://github.com/numpy/numpy'
4✔
9
    hostpython_prerequisites = ["Cython>=3.0.6"]  # meson does not detects venv's cython
4✔
10
    extra_build_args = ['-Csetup-args=-Dblas=none', '-Csetup-args=-Dlapack=none']
4✔
11
    need_stl_shared = True
4✔
12
    min_ndk_api_support = 24  # NumPy requires complex math functions which were added in api 24
4✔
13

14
    def get_recipe_meson_options(self, arch):
4✔
15
        options = super().get_recipe_meson_options(arch)
×
16
        # Custom python is required, so that meson
17
        # gets libs and config files properly
18
        options["binaries"]["python"] = self.ctx.python_recipe.python_exe
×
19
        options["binaries"]["python3"] = self.ctx.python_recipe.python_exe
×
20
        options["properties"]["longdouble_format"] = "IEEE_DOUBLE_LE" if arch.arch in ["armeabi-v7a", "x86"] else "IEEE_QUAD_LE"
×
21
        return options
×
22

23
    def get_recipe_env(self, arch, **kwargs):
4✔
24
        env = super().get_recipe_env(arch, **kwargs)
×
25

26
        # _PYTHON_HOST_PLATFORM declares that we're cross-compiling
27
        # and avoids issues when building on macOS for Android targets.
28
        env["_PYTHON_HOST_PLATFORM"] = arch.command_prefix
×
29

30
        # NPY_DISABLE_SVML=1 allows numpy to build for non-AVX512 CPUs
31
        # See: https://github.com/numpy/numpy/issues/21196
32
        env["NPY_DISABLE_SVML"] = "1"
×
33
        env["TARGET_PYTHON_EXE"] = join(Recipe.get_recipe(
×
34
                "python3", self.ctx).get_build_dir(arch.arch), "android-build", "python")
35
        return env
×
36

37
    def build_arch(self, arch):
4✔
UNCOV
38
        super().build_arch(arch)
×
39
        self.restore_hostpython_prerequisites(["cython"])
×
40

41
    def get_hostrecipe_env(self, arch):
4✔
42
        env = super().get_hostrecipe_env(arch)
×
43
        env['RANLIB'] = shutil.which('ranlib')
×
44
        env["LDFLAGS"] += " -lm"
×
45
        return env
×
46

47

48
recipe = NumpyRecipe()
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

© 2025 Coveralls, Inc