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

kivy / python-for-android / 14420258271

12 Apr 2025 01:55PM UTC coverage: 59.141% (+0.03%) from 59.111%
14420258271

push

github

web-flow
Add `SDL3` bootstrap (alongside `SDL3`, `SDL3_ttf`, `SDL3_mixer`, `SDL3_image` recipes) for Kivy `3.0.0` (#3125)

* Add SDL3 bootstrap

* Avoid some DRY issues + minor fixes + version bump

1054 of 2383 branches covered (44.23%)

Branch coverage included in aggregate %.

112 of 160 new or added lines in 14 files covered. (70.0%)

1 existing line in 1 file now uncovered.

4960 of 7786 relevant lines covered (63.7%)

2.54 hits per line

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

56.52
/pythonforandroid/recipes/sdl3_mixer/__init__.py
1
import os
4✔
2
import sh
4✔
3
from pythonforandroid.logger import shprint
4✔
4
from pythonforandroid.recipe import BootstrapNDKRecipe
4✔
5
from pythonforandroid.util import current_directory
4✔
6

7

8
class LibSDL3Mixer(BootstrapNDKRecipe):
4✔
9
    version = "72a73339731a12c1002f9caca64f1ab924938102"
4✔
10
    # url = "https://github.com/libsdl-org/SDL_ttf/releases/download/release-{version}/SDL3_ttf-{version}.tar.gz"
11
    url = "https://github.com/libsdl-org/SDL_mixer/archive/{version}.tar.gz"
4✔
12
    dir_name = "SDL3_mixer"
4✔
13

14
    patches = ["disable-libgme.patch"]
4✔
15

16
    def get_include_dirs(self, arch):
4✔
NEW
17
        return [
×
18
            os.path.join(
19
                self.ctx.bootstrap.build_dir, "jni", "SDL3_mixer", "include"
20
            ),
21
            os.path.join(
22
                self.ctx.bootstrap.build_dir,
23
                "jni",
24
                "SDL3_mixer",
25
                "include",
26
                "SDL3_mixer",
27
            ),
28
        ]
29

30
    def prebuild_arch(self, arch):
4✔
31
        # We do not have a folder for each arch on BootstrapNDKRecipe, so we
32
        # need to skip the external deps download if we already have done it.
NEW
33
        external_deps_dir = os.path.join(
×
34
            self.get_build_dir(arch.arch), "external"
35
        )
36

NEW
37
        if not os.path.exists(
×
38
            os.path.join(external_deps_dir, "libgme", "Android.mk")
39
        ):
NEW
40
            with current_directory(external_deps_dir):
×
NEW
41
                shprint(sh.Command("./download.sh"))
×
NEW
42
        super().prebuild_arch(arch)
×
43

44

45
recipe = LibSDL3Mixer()
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