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

kivy / python-for-android / 18352464164

08 Oct 2025 05:09PM UTC coverage: 59.116% (-0.04%) from 59.151%
18352464164

push

github

web-flow
`python`: add `3.14` support (#3180)

1071 of 2411 branches covered (44.42%)

Branch coverage included in aggregate %.

91 of 129 new or added lines in 6 files covered. (70.54%)

10 existing lines in 3 files now uncovered.

4989 of 7840 relevant lines covered (63.64%)

5.08 hits per line

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

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

5
NUMPY_NDK_MESSAGE = "In order to build numpy, you must set minimum ndk api (minapi) to `24`.\n"
8✔
6

7

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

16
    def get_recipe_meson_options(self, arch):
8✔
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):
8✔
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):
8✔
40
        super().build_arch(arch)
×
41
        self.restore_hostpython_prerequisites(["cython"])
×
42

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

48

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