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

kivy / python-for-android / 5976260269

25 Aug 2023 01:05PM UTC coverage: 58.986% (+0.3%) from 58.676%
5976260269

push

github

web-flow
Standardise `ensure_dir` and `rmdir` (#2871)

* Standardise ensure_dir and rmdir

* Standardise ensure_dir and rmdir

* Add libmysqlclient to broken list

* Libtorrent failing to be rebuilt

* Add boost to broken recipes list

940 of 2241 branches covered (0.0%)

Branch coverage included in aggregate %.

73 of 113 new or added lines in 21 files covered. (64.6%)

3 existing lines in 3 files now uncovered.

4715 of 7346 relevant lines covered (64.18%)

2.56 hits per line

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

40.0
/pythonforandroid/recipes/ifaddrs/__init__.py
1
""" ifaddrs for Android
2
"""
3
from os.path import join
4✔
4

5
import sh
4✔
6

7
from pythonforandroid.logger import shprint
4✔
8
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
4✔
9
from pythonforandroid.toolchain import current_directory
4✔
10
from pythonforandroid.util import ensure_dir
4✔
11

12

13
class IFAddrRecipe(CompiledComponentsPythonRecipe):
4✔
14
    version = '8f9a87c'
4✔
15
    url = 'https://github.com/morristech/android-ifaddrs/archive/{version}.zip'
4✔
16
    depends = ['hostpython3']
4✔
17

18
    call_hostpython_via_targetpython = False
4✔
19
    site_packages_name = 'ifaddrs'
4✔
20
    generated_libraries = ['libifaddrs.so']
4✔
21

22
    def prebuild_arch(self, arch):
4✔
23
        """Make the build and target directories"""
24
        path = self.get_build_dir(arch.arch)
×
NEW
25
        ensure_dir(path)
×
26

27
    def build_arch(self, arch):
4✔
28
        """simple shared compile"""
29
        env = self.get_recipe_env(arch, with_flags_in_cc=False)
×
30
        for path in (
×
31
                self.get_build_dir(arch.arch),
32
                join(self.ctx.python_recipe.get_build_dir(arch.arch), 'Lib'),
33
                join(self.ctx.python_recipe.get_build_dir(arch.arch), 'Include')):
NEW
34
            ensure_dir(path)
×
35
        cli = env['CC'].split()[0]
×
36
        # makes sure first CC command is the compiler rather than ccache, refs:
37
        # https://github.com/kivy/python-for-android/issues/1398
38
        if 'ccache' in cli:
×
39
            cli = env['CC'].split()[1]
×
40
        cc = sh.Command(cli)
×
41

42
        with current_directory(self.get_build_dir(arch.arch)):
×
43
            cflags = env['CFLAGS'].split()
×
44
            cflags.extend(['-I.', '-c', '-l.', 'ifaddrs.c', '-I.'])
×
45
            shprint(cc, *cflags, _env=env)
×
46
            cflags = env['CFLAGS'].split()
×
47
            cflags.extend(['-shared', '-I.', 'ifaddrs.o', '-o', 'libifaddrs.so'])
×
48
            cflags.extend(env['LDFLAGS'].split())
×
49
            shprint(cc, *cflags, _env=env)
×
50
            shprint(sh.cp, 'libifaddrs.so', self.ctx.get_libs_dir(arch.arch))
×
51

52

53
recipe = IFAddrRecipe()
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