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

kivy / python-for-android / 24930372022

25 Apr 2026 11:58AM UTC coverage: 62.932% (-0.5%) from 63.382%
24930372022

push

github

web-flow
fix PYTHONPATH hacks (#3301)

* fix PYTHONPATH hacks

* fix android recipe

* fix numpy and matplotlib build

* no shebang patching required now

* fix kivy master build

* fix numpy build

* more wrappers for meson recipe

* flake8 fix

* add back pandas host preq

* fix bug in logger

* add back cython for pandas

1832 of 3175 branches covered (57.7%)

Branch coverage included in aggregate %.

61 of 150 new or added lines in 8 files covered. (40.67%)

9 existing lines in 2 files now uncovered.

5329 of 8204 relevant lines covered (64.96%)

5.18 hits per line

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

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

9

10
class NumpyRecipe(MesonRecipe):
8✔
11
    version = "v2.3.0"
8✔
12
    url = "git+https://github.com/numpy/numpy"
8✔
13
    extra_build_args = ["-Csetup-args=-Dblas=none", "-Csetup-args=-Dlapack=none"]
8✔
14
    need_stl_shared = True
8✔
15
    min_ndk_api_support = 24
8✔
16

17
    def get_include(self, arch):
8✔
NEW
18
        return join(
×
19
            self.ctx.get_python_install_dir(arch.arch), "numpy/_core/include",
20
        )
21

22
    def get_recipe_meson_options(self, arch):
8✔
23
        options = super().get_recipe_meson_options(arch)
×
NEW
24
        options["properties"]["longdouble_format"] = (
×
25
            "IEEE_DOUBLE_LE" if arch.arch in ["armeabi-v7a", "x86"] else "IEEE_QUAD_LE"
26
        )
UNCOV
27
        return options
×
28

29
    def get_recipe_env(self, arch, **kwargs):
8✔
30
        env = super().get_recipe_env(arch, **kwargs)
×
31

32
        # _PYTHON_HOST_PLATFORM declares that we're cross-compiling
33
        # and avoids issues when building on macOS for Android targets.
34
        env["_PYTHON_HOST_PLATFORM"] = arch.command_prefix
×
35

36
        # NPY_DISABLE_SVML=1 allows numpy to build for non-AVX512 CPUs
37
        # See: https://github.com/numpy/numpy/issues/21196
38
        env["NPY_DISABLE_SVML"] = "1"
×
NEW
39
        env["TARGET_PYTHON_EXE"] = join(
×
40
            Recipe.get_recipe("python3", self.ctx).get_build_dir(arch.arch),
41
            "android-build",
42
            "python",
43
        )
UNCOV
44
        return env
×
45

46
    def get_hostrecipe_env(self, arch=None):
8✔
47
        env = super().get_hostrecipe_env(arch=arch)
×
NEW
48
        env["RANLIB"] = shutil.which("ranlib")
×
49
        return env
×
50

51

52
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