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

kivy / python-for-android / 18806671474

25 Oct 2025 06:09PM UTC coverage: 58.805% (+0.002%) from 58.803%
18806671474

Pull #3233

github

web-flow
Merge 0b72d2e0a into 7593f9d62
Pull Request #3233: `cffi`: fix build

1078 of 2444 branches covered (44.11%)

Branch coverage included in aggregate %.

8 of 9 new or added lines in 3 files covered. (88.89%)

1 existing line in 1 file now uncovered.

5043 of 7965 relevant lines covered (63.31%)

5.05 hits per line

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

40.74
/pythonforandroid/recipes/cffi/__init__.py
1
import os
8✔
2
from pythonforandroid.recipe import PyProjectRecipe
8✔
3

4

5
class CffiRecipe(PyProjectRecipe):
8✔
6
    """
7
    Extra system dependencies: autoconf, automake and libtool.
8
    """
9
    name = 'cffi'
8✔
10
    version = '2.0.0'
8✔
11
    url = 'https://github.com/python-cffi/cffi/archive/refs/tags/v{version}.tar.gz'
8✔
12

13
    depends = ['pycparser', 'libffi']
8✔
14

15
    patches = ['disable-pkg-config.patch']
8✔
16

17
    def get_hostrecipe_env(self, arch=None):
8✔
18
        # fixes missing ffi.h on some host systems (e.g. gentoo)
19
        env = super().get_hostrecipe_env(arch)
×
20
        libffi = self.get_recipe('libffi', self.ctx)
×
21
        includes = libffi.get_include_dirs(arch)
×
22
        env['FFI_INC'] = ",".join(includes)
×
23
        return env
×
24

25
    def get_recipe_env(self, arch=None, **kwargs):
8✔
NEW
26
        env = super().get_recipe_env(arch, **kwargs)
×
27
        libffi = self.get_recipe('libffi', self.ctx)
×
28
        includes = libffi.get_include_dirs(arch)
×
29
        env['CFLAGS'] = ' -I'.join([env.get('CFLAGS', '')] + includes)
×
30
        env['CFLAGS'] += ' -I{}'.format(self.ctx.python_recipe.include_root(arch.arch))
×
31
        env['LDFLAGS'] = (env.get('CFLAGS', '') + ' -L' +
×
32
                          self.ctx.get_libs_dir(arch.arch))
33
        env['LDFLAGS'] += ' -L{}'.format(os.path.join(self.ctx.bootstrap.build_dir, 'libs', arch.arch))
×
34
        # required for libc and libdl
35
        env['LDFLAGS'] += ' -L{}'.format(arch.ndk_lib_dir_versioned)
×
36
        env['LDFLAGS'] += ' -L{}'.format(self.ctx.python_recipe.link_root(arch.arch))
×
UNCOV
37
        env['LDFLAGS'] += ' -lpython{}'.format(self.ctx.python_recipe.link_version)
×
38
        return env
×
39

40

41
recipe = CffiRecipe()
8✔
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