• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In
Build has been canceled!

kivy / python-for-android / 5436060630

pending completion
5436060630

push

github

web-flow
Fix `vlc` recipe build (#2841)

941 of 2264 branches covered (41.56%)

Branch coverage included in aggregate %.

1 of 3 new or added lines in 1 file covered. (33.33%)

4708 of 7347 relevant lines covered (64.08%)

2.53 hits per line

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

25.4
/pythonforandroid/recipes/vlc/__init__.py
1
from pythonforandroid.toolchain import Recipe, current_directory
4✔
2
from pythonforandroid.logger import info, debug, shprint, warning
4✔
3
from os.path import join, isdir, isfile
4✔
4
from os import environ
4✔
5
import sh
4✔
6

7

8
class VlcRecipe(Recipe):
4✔
9
    version = '3.0.18'
4✔
10
    url = None
4✔
11
    name = 'vlc'
4✔
12

13
    depends = []
4✔
14

15
    port_git = 'http://git.videolan.org/git/vlc-ports/android.git'
4✔
16
#    vlc_git = 'http://git.videolan.org/git/vlc.git'
17
    ENV_LIBVLC_AAR = 'LIBVLC_AAR'
4✔
18
    aars = {}  # for future use of multiple arch
4✔
19

20
    def prebuild_arch(self, arch):
4✔
21
        super().prebuild_arch(arch)
×
22
        build_dir = self.get_build_dir(arch.arch)
×
23
        port_dir = join(build_dir, 'vlc-port-android')
×
24
        if self.ENV_LIBVLC_AAR in environ:
×
25
            aar = environ.get(self.ENV_LIBVLC_AAR)
×
26
            if isdir(aar):
×
27
                aar = join(aar, 'libvlc-{}.aar'.format(self.version))
×
28
            if not isfile(aar):
×
29
                warning("Error: {} is not valid libvlc-<ver>.aar bundle".format(aar))
×
30
                info("check {} environment!".format(self.ENV_LIBVLC_AAR))
×
31
                exit(1)
×
32
            self.aars[arch] = aar
×
33
        else:
34
            aar_path = join(port_dir, 'libvlc', 'build', 'outputs', 'aar')
×
35
            self.aars[arch] = aar = join(aar_path, 'libvlc-{}.aar'.format(self.version))
×
36
            warning("HINT: set path to precompiled libvlc-<ver>.aar bundle "
×
37
                    "in {} environment!".format(self.ENV_LIBVLC_AAR))
38
            info("libvlc-<ver>.aar should build "
×
39
                 "from sources at {}".format(port_dir))
40
            if not isfile(join(port_dir, 'compile.sh')):
×
41
                info("clone vlc port for android sources from {}".format(
×
42
                            self.port_git))
43
                shprint(sh.git, 'clone', self.port_git, port_dir,
×
44
                        _tail=20, _critical=True)
45
# now "git clone ..." is a part of compile.sh
46
#            vlc_dir = join(port_dir, 'vlc')
47
#            if not isfile(join(vlc_dir, 'Makefile.am')):
48
#                info("clone vlc sources from {}".format(self.vlc_git))
49
#                shprint(sh.git, 'clone', self.vlc_git, vlc_dir,
50
#                            _tail=20, _critical=True)
51

52
    def build_arch(self, arch):
4✔
53
        super().build_arch(arch)
×
54
        build_dir = self.get_build_dir(arch.arch)
×
NEW
55
        port_dir = join(build_dir, 'vlc-port-android', 'buildsystem')
×
56
        aar = self.aars[arch]
×
57
        if not isfile(aar):
×
58
            with current_directory(port_dir):
×
59
                env = dict(environ)
×
60
                env.update({
×
61
                    'ANDROID_ABI': arch.arch,
62
                    'ANDROID_NDK': self.ctx.ndk_dir,
63
                    'ANDROID_SDK': self.ctx.sdk_dir,
64
                })
65
                info("compiling vlc from sources")
×
66
                debug("environment: {}".format(env))
×
67
                if not isfile(join('bin', 'VLC-debug.apk')):
×
68
                    shprint(sh.Command('./compile.sh'), _env=env,
×
69
                            _tail=50, _critical=True)
NEW
70
                shprint(sh.Command('./compile-medialibrary.sh'), _env=env,
×
71
                        _tail=50, _critical=True)
72
        shprint(sh.cp, '-a', aar, self.ctx.aars_dir)
×
73

74

75
recipe = VlcRecipe()
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