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

kivy / python-for-android / 17641397155

11 Sep 2025 10:15AM UTC coverage: 59.214% (+0.04%) from 59.171%
17641397155

Pull #3168

github

web-flow
Merge 42336ff0c into 5330267b5
Pull Request #3168: Fix broadcast receiver

1060 of 2385 branches covered (44.44%)

Branch coverage included in aggregate %.

4965 of 7790 relevant lines covered (63.74%)

2.54 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):
4✔
44
        env = super().get_hostrecipe_env(arch)
×
45
        env['RANLIB'] = shutil.which('ranlib')
×
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

© 2025 Coveralls, Inc