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

kivy / python-for-android / 18239320693

04 Oct 2025 04:03AM UTC coverage: 59.085% (-0.04%) from 59.122%
18239320693

Pull #3180

github

web-flow
Merge 79d1051c1 into 5aa97321e
Pull Request #3180: `python`: add `3.13` support

1068 of 2409 branches covered (44.33%)

Branch coverage included in aggregate %.

90 of 128 new or added lines in 6 files covered. (70.31%)

10 existing lines in 3 files now uncovered.

4987 of 7839 relevant lines covered (63.62%)

2.53 hits per line

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

50.0
/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
NUMPY_NDK_MESSAGE = "In order to build numpy, you must set minimum ndk api (minapi) to `24`.\n"
4✔
6

7

8
class NumpyRecipe(MesonRecipe):
4✔
9
    version = 'v2.3.0'
4✔
10
    url = 'git+https://github.com/numpy/numpy'
4✔
11
    hostpython_prerequisites = ["Cython>=3.0.6", "numpy"]  # meson does not detects venv's cython
4✔
12
    extra_build_args = ['-Csetup-args=-Dblas=none', '-Csetup-args=-Dlapack=none']
4✔
13
    need_stl_shared = True
4✔
14
    min_ndk_api_support = 24
4✔
15

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

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

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

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

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

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

49

50
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

© 2026 Coveralls, Inc