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

kivy / python-for-android / 18432723905

11 Oct 2025 05:44PM UTC coverage: 59.017% (-0.1%) from 59.116%
18432723905

Pull #3018

github

web-flow
Merge 30d657876 into c63d8e2a9
Pull Request #3018: recipes: add new `panda3d` recipe

1071 of 2415 branches covered (44.35%)

Branch coverage included in aggregate %.

14 of 37 new or added lines in 1 file covered. (37.84%)

5003 of 7877 relevant lines covered (63.51%)

5.07 hits per line

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

34.15
/pythonforandroid/recipes/panda3d/__init__.py
1
import sh
8✔
2
from os.path import join, basename
8✔
3
from glob import glob
8✔
4
from multiprocessing import cpu_count
8✔
5
from pythonforandroid.recipe import PyProjectRecipe
8✔
6
from pythonforandroid.util import current_directory, ensure_dir
8✔
7
from pythonforandroid.logger import shprint
8✔
8

9

10
class Panda3dRecipe(PyProjectRecipe):
8✔
11
    version = "1.10.14"
8✔
12
    url = "https://github.com/panda3d/panda3d/archive/refs/tags/v{version}.tar.gz"
8✔
13
    patches = ["makepanda.patch"]
8✔
14

15
    def get_recipe_env(self, arch):
8✔
NEW
16
        env = super().get_recipe_env(arch)
×
NEW
17
        env["ANDROID_NDK_ROOT"] = self.ctx.ndk_dir
×
NEW
18
        env["ANDROID_SDK_ROOT"] = self.ctx.sdk_dir
×
NEW
19
        env["ANDROID_TARGET_API"] = str(self.ctx.android_api)
×
20

NEW
21
        env["CXXFLAGS"] += " -stdlib=libstdc++ -Wno-unsupported-floating-point-opt"
×
NEW
22
        env["CFLAGS"] += " -Wno-unsupported-floating-point-opt"
×
23

24
        # Python includes
NEW
25
        python_includes = self.ctx.python_recipe.include_root(arch.arch)
×
NEW
26
        env["CXXFLAGS"] += " -I{}".format(python_includes)
×
NEW
27
        env["CFLAGS"] += " -I{}".format(python_includes)
×
28

NEW
29
        return env
×
30

31
    def build_arch(self, arch):
8✔
NEW
32
        self.install_hostpython_prerequisites()
×
NEW
33
        build_dir = self.get_build_dir(arch)
×
NEW
34
        env = self.get_recipe_env(arch)
×
NEW
35
        outputdir = join(build_dir, "dist")
×
NEW
36
        ensure_dir(outputdir)
×
37
        # Used by makepanda
NEW
38
        _arch = {
×
39
            "armeabi-v7a": "armv7a",
40
            "arm64-v8a": "aarch64",
41
            "x86": "x86",
42
            "x86_64": "x86_64",
43
        }[arch.arch]
44

45
        # Setup python lib folder
NEW
46
        panda3d_lib_dir = join(build_dir, "thirdparty/android-libs-{}".format(_arch), "python", "lib")
×
NEW
47
        ensure_dir(panda3d_lib_dir)
×
NEW
48
        for lib in glob(join(self.ctx.python_recipe.link_root(arch.arch), "*.so")):
×
NEW
49
            shprint(
×
50
                sh.ln, "-sf", lib, join(panda3d_lib_dir, basename(lib))
51
            )
52

NEW
53
        with current_directory(build_dir):
×
NEW
54
            shprint(
×
55
                sh.Command(self.hostpython_location),
56
                "makepanda/makepanda.py",
57
                "--everything",
58
                "--outputdir",
59
                outputdir,
60
                "--arch",
61
                _arch,
62
                "--target",
63
                "android-{}".format(self.ctx.ndk_api),
64
                "--threads",
65
                str(cpu_count()),
66
                "--wheel",
67
                _env=env
68
            )
NEW
69
        self.install_wheel(arch, join(build_dir, "dist", "*.whl"))
×
70

71

72
recipe = Panda3dRecipe()
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