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

kivy / python-for-android / 3770732673

pending completion
3770732673

push

github

GitHub
Merge pull request #2718 from kivy/release-2022.12.20

877 of 2011 branches covered (43.61%)

Branch coverage included in aggregate %.

38 of 86 new or added lines in 16 files covered. (44.19%)

4515 of 6886 relevant lines covered (65.57%)

2.59 hits per line

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

40.63
/pythonforandroid/recipes/audiostream/__init__.py
1

2
from pythonforandroid.recipe import CythonRecipe
4✔
3
from pythonforandroid.toolchain import shprint, current_directory, info
4✔
4
import sh
4✔
5
from os.path import join
4✔
6

7

8
class AudiostreamRecipe(CythonRecipe):
4✔
9
    # audiostream has no tagged versions; this is the latest commit to master 2020-12-22
10
    # it includes a fix for the dyload issue on android that was preventing use
11
    version = '69f6b100f1ea4e3982a1acf6bbb0804e31a2cd50'
4✔
12
    url = 'https://github.com/kivy/audiostream/archive/{version}.zip'
4✔
13
    sha256sum = '4d415c91706fd76865d0d22f1945f87900dc42125ff5a6c8d77898ccdf613c21'
4✔
14
    name = 'audiostream'
4✔
15
    depends = ['python3', 'sdl2', 'pyjnius']
4✔
16

17
    def get_recipe_env(self, arch):
4✔
18
        env = super().get_recipe_env(arch)
×
19
        sdl_include = 'SDL2'
×
20

21
        env['USE_SDL2'] = 'True'
×
22
        env['SDL2_INCLUDE_DIR'] = join(self.ctx.bootstrap.build_dir, 'jni', 'SDL', 'include')
×
23

NEW
24
        env['CFLAGS'] += ' -I{jni_path}/{sdl_include}/include'.format(
×
25
                              jni_path=join(self.ctx.bootstrap.build_dir, 'jni'),
26
                              sdl_include=sdl_include)
27

NEW
28
        sdl2_mixer_recipe = self.get_recipe('sdl2_mixer', self.ctx)
×
NEW
29
        for include_dir in sdl2_mixer_recipe.get_include_dirs(arch):
×
NEW
30
            env['CFLAGS'] += ' -I{include_dir}'.format(include_dir=include_dir)
×
31

32
        # NDKPLATFORM is our switch for detecting Android platform, so can't be None
33
        env['NDKPLATFORM'] = "NOTNONE"
×
34
        env['LIBLINK'] = 'NOTNONE'  # Hacky fix. Needed by audiostream setup.py
×
35
        return env
×
36

37
    def postbuild_arch(self, arch):
4✔
38
        # TODO: This code was copied from pyjnius, but judging by the
39
        #       audiostream history, it looks like this step might have
40
        #       happened automatically in the past.
41
        #       Given the goal of migrating off of recipes, it would
42
        #       be good to repair or build infrastructure for doing this
43
        #       automatically, for when including a java class is
44
        #       the best solution to a problem.
45
        super().postbuild_arch(arch)
×
46
        info('Copying audiostream java files to classes build dir')
×
47
        with current_directory(self.get_build_dir(arch.arch)):
×
48
            shprint(sh.cp, '-a', join('audiostream', 'platform', 'android'), self.ctx.javaclass_dir)
×
49

50

51
recipe = AudiostreamRecipe()
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

© 2026 Coveralls, Inc