• 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

0.0
/pythonforandroid/meson_python.py
NEW
1
import sys
×
NEW
2
import json
×
NEW
3
import subprocess
×
NEW
4
import importlib.util
×
NEW
5
from os.path import join
×
NEW
6
from glob import glob
×
7

8

NEW
9
class C:
×
NEW
10
    TARGET_PYTHON_PREFIX = globals().get("TARGET_PYTHON_PREFIX")
×
NEW
11
    PYTHON_MAJOR_VERSION = globals().get("PYTHON_MAJOR_VERSION", sys.version_info.major)
×
NEW
12
    PYTHON_MINOR_VERSION = globals().get("PYTHON_MINOR_VERSION", sys.version_info.minor)
×
NEW
13
    PLATFORM_TAG = globals().get("PLATFORM_TAG", sys.platform)
×
NEW
14
    PYTHON_SUFFIX = globals().get("PYTHON_SUFFIX", "")
×
15

16

NEW
17
def handle_python_info():
×
18

NEW
19
    prefix = C.TARGET_PYTHON_PREFIX
×
20

NEW
21
    sysconfig_file = glob(join(prefix, "lib/python3.14/_sysconfigdata*.py"))[0]
×
22

NEW
23
    spec = importlib.util.spec_from_file_location("_android_cfg", sysconfig_file)
×
NEW
24
    cfg = importlib.util.module_from_spec(spec)
×
NEW
25
    spec.loader.exec_module(cfg)
×
26

NEW
27
    ver_python = f"python{C.PYTHON_MAJOR_VERSION}.{C.PYTHON_MINOR_VERSION}"
×
28

NEW
29
    site_path = join(prefix, f"lib/{ver_python}/site-packages")
×
30

NEW
31
    android_paths = {
×
32
        "stdlib": join(prefix, "lib"),
33
        "platstdlib": join(prefix, "lib"),
34
        "purelib": site_path,
35
        "platlib": site_path,
36
        "include": join(prefix, f"include/{ver_python}/"),
37
        "platinclude": join(prefix, f"include/{ver_python}/"),
38
        "scripts": join(prefix, "bin"),
39
        "data": prefix,
40
    }
41

NEW
42
    print(
×
43
        json.dumps(
44
            {
45
                "variables": cfg.build_time_vars,
46
                "paths": android_paths,
47
                "sysconfig_paths": android_paths,
48
                "install_paths": android_paths,
49
                "version": f"{C.PYTHON_MAJOR_VERSION}.{C.PYTHON_MINOR_VERSION}",
50
                "platform": C.PLATFORM_TAG,
51
                "is_pypy": False,
52
                "is_venv": False,
53
                "link_libpython": True,
54
                "suffix": C.PYTHON_SUFFIX,
55
                "limited_api_suffix": ".abi3.so",
56
                "is_freethreaded": False,
57
            }
58
        )
59
    )
60

61

NEW
62
WHITELIST = {
×
63
    "python_info.py": handle_python_info,
64
}
65

66

NEW
67
args = sys.argv[1:]
×
68

NEW
69
if args:
×
NEW
70
    cmd = args[0]
×
NEW
71
    name = cmd.split("/")[-1]
×
72

NEW
73
    if name in WHITELIST:
×
NEW
74
        sys.exit(WHITELIST[name]())
×
75

NEW
76
sys.exit(subprocess.run([sys.executable] + args).returncode)
×
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