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

kivy / python-for-android / 7239023125

17 Dec 2023 02:11PM UTC coverage: 59.041% (-0.05%) from 59.09%
7239023125

push

github

web-flow
Update sdl2 deps to reflect the same targeted in kivy/kivy (#2927)

* Update sdl2 deps to reflect the same targeted in kivy/kivy

* Update md5 sum

* Create new patch and set new include dir for sdl_image

* Set pygame as broken recipe

* sdl_image 2.8.0 has been released

941 of 2245 branches covered (0.0%)

Branch coverage included in aggregate %.

6 of 12 new or added lines in 6 files covered. (50.0%)

3 existing lines in 3 files now uncovered.

4734 of 7367 relevant lines covered (64.26%)

2.56 hits per line

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

51.85
/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.28.5"
4✔
10
    url = "https://github.com/libsdl-org/SDL/releases/download/release-{version}/SDL2-{version}.tar.gz"
4✔
11
    md5sum = 'a344eb827a03045c9b399e99af4af13d'
4✔
12

13
    dir_name = 'SDL'
4✔
14

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

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

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

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

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

39

40
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