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

kivy / python-for-android / 14318575834

07 Apr 2025 08:13PM UTC coverage: 58.902% (-0.2%) from 59.111%
14318575834

Pull #3125

github

web-flow
Merge 2abaa319a into fbd525588
Pull Request #3125: [WIP] Add SDL3 bootstrap

1053 of 2397 branches covered (43.93%)

Branch coverage included in aggregate %.

77 of 146 new or added lines in 12 files covered. (52.74%)

188 existing lines in 2 files now uncovered.

4955 of 7803 relevant lines covered (63.5%)

3.16 hits per line

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

50.0
/pythonforandroid/recipes/sdl3/__init__.py
1
from os.path import exists, join
5✔
2

3
from pythonforandroid.recipe import BootstrapNDKRecipe
5✔
4
from pythonforandroid.toolchain import current_directory, shprint
5✔
5
import sh
5✔
6

7

8
class LibSDL3Recipe(BootstrapNDKRecipe):
5✔
9
    version = "3.2.8"
5✔
10
    url = "https://github.com/libsdl-org/SDL/releases/download/release-{version}/SDL3-{version}.tar.gz"
5✔
11
    # md5sum = 'a344eb827a03045c9b399e99af4af13d'
12

13
    dir_name = "SDL"
5✔
14

15
    depends = ["sdl3_image", "sdl3_mixer", "sdl3_ttf"]
5✔
16

17
    def get_recipe_env(
5✔
18
        self, arch=None, with_flags_in_cc=True, with_python=True
19
    ):
NEW
20
        env = super().get_recipe_env(
×
21
            arch=arch,
22
            with_flags_in_cc=with_flags_in_cc,
23
            with_python=with_python,
24
        )
NEW
25
        env["APP_ALLOW_MISSING_DEPS"] = "true"
×
NEW
26
        return env
×
27

28
    def get_include_dirs(self, arch):
5✔
NEW
29
        return [
×
30
            join(self.ctx.bootstrap.build_dir, "jni", "SDL", "include"),
31
            join(self.ctx.bootstrap.build_dir, "jni", "SDL", "include", "SDL3"),
32
        ]
33

34
    def should_build(self, arch):
5✔
NEW
35
        libdir = join(self.get_build_dir(arch.arch), "../..", "libs", arch.arch)
×
NEW
36
        libs = [
×
37
            "libmain.so",
38
            "libSDL3.so",
39
            "libSDL3_image.so",
40
            "libSDL3_mixer.so",
41
            "libSDL3_ttf.so",
42
        ]
NEW
43
        return not all(exists(join(libdir, x)) for x in libs)
×
44

45
    def build_arch(self, arch):
5✔
NEW
46
        env = self.get_recipe_env(arch)
×
47

NEW
48
        with current_directory(self.get_jni_dir()):
×
NEW
49
            shprint(
×
50
                sh.Command(join(self.ctx.ndk_dir, "ndk-build")),
51
                "V=1",
52
                "NDK_DEBUG=" + ("1" if self.ctx.build_as_debuggable else "0"),
53
                _env=env,
54
            )
55

56

57
recipe = LibSDL3Recipe()
5✔
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