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

kivy / python-for-android / 3947118423

pending completion
3947118423

push

github

GitHub
Merge pull request #2738 from FilipeMarch/patch-2

897 of 2261 branches covered (39.67%)

Branch coverage included in aggregate %.

2 of 2 new or added lines in 1 file covered. (100.0%)

6 existing lines in 1 file now uncovered.

4584 of 7381 relevant lines covered (62.11%)

2.46 hits per line

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

53.57
/pythonforandroid/recipes/sdl2/__init__.py
1
from os.path import exists, join
4✔
2

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

7

8
class LibSDL2Recipe(BootstrapNDKRecipe):
4✔
9
    version = "2.26.1"
4✔
10
    url = "https://github.com/libsdl-org/SDL/releases/download/release-{version}/SDL2-{version}.tar.gz"
4✔
11
    md5sum = 'fba211fe2c67609df6fa3cf55d3c74dc'
4✔
12

13
    dir_name = 'SDL'
4✔
14

15
    depends = ['sdl2_image', 'sdl2_mixer', 'sdl2_ttf']
4✔
16

17
    patches = ['sdl-orientation-pr-6984.diff']
4✔
18

19
    def get_recipe_env(self, arch=None, with_flags_in_cc=True, with_python=True):
4✔
20
        env = super().get_recipe_env(
×
21
            arch=arch, with_flags_in_cc=with_flags_in_cc, with_python=with_python)
UNCOV
22
        env['APP_ALLOW_MISSING_DEPS'] = 'true'
×
UNCOV
23
        return env
×
24

25
    def should_build(self, arch):
4✔
26
        libdir = join(self.get_build_dir(arch.arch), "../..", "libs", arch.arch)
×
UNCOV
27
        libs = ['libmain.so', 'libSDL2.so', 'libSDL2_image.so', 'libSDL2_mixer.so', 'libSDL2_ttf.so']
×
UNCOV
28
        return not all(exists(join(libdir, x)) for x in libs)
×
29

30
    def build_arch(self, arch):
4✔
31
        env = self.get_recipe_env(arch)
×
32

UNCOV
33
        with current_directory(self.get_jni_dir()):
×
UNCOV
34
            shprint(
×
35
                sh.Command(join(self.ctx.ndk_dir, "ndk-build")),
36
                "V=1",
37
                "NDK_DEBUG=" + ("1" if self.ctx.build_as_debuggable else "0"),
38
                _env=env
39
            )
40

41

42
recipe = LibSDL2Recipe()
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