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

kivy / python-for-android / 22259302242

21 Feb 2026 03:24PM UTC coverage: 63.887% (+4.7%) from 59.214%
22259302242

Pull #3198

github

web-flow
Merge 758a52847 into 1fc026943
Pull Request #3198: Bump SDL3 (`3.4.2`) and SDL3_image (`3.4.0`) to the latest stable releases.

1823 of 3111 branches covered (58.6%)

Branch coverage included in aggregate %.

3 of 3 new or added lines in 2 files covered. (100.0%)

788 existing lines in 24 files now uncovered.

5287 of 8018 relevant lines covered (65.94%)

5.26 hits per line

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

36.36
/pythonforandroid/recipes/Pillow/__init__.py
1
from os.path import join
8✔
2

3
from pythonforandroid.recipe import PyProjectRecipe
8✔
4

5

6
class PillowRecipe(PyProjectRecipe):
8✔
7
    """
8
    A recipe for Pillow (previously known as Pil).
9

10
    This recipe allow us to build the Pillow recipe with support for different
11
    types of images and fonts. But you should be aware, that in order to  use
12
    some of the features of  Pillow, we must build some libraries. By default
13
    we automatically trigger the build of below libraries::
14

15
        - freetype: rendering fonts support.
16
        - harfbuzz: a text shaping library.
17
        - jpeg: reading and writing JPEG image files.
18
        - png: support for PNG images.
19

20
    But you also could enable the build of some extra image types by requesting
21
    the build of some libraries via argument `requirements`::
22

23
        - libwebp: library to encode and decode images in WebP format.
24
    """
25

26
    version = '11.3.0'
8✔
27
    url = 'https://github.com/python-pillow/Pillow/archive/{version}.tar.gz'
8✔
28
    site_packages_name = 'PIL'
8✔
29
    patches = ["setup.py.patch"]
8✔
30
    depends = ['png', 'jpeg', 'freetype']
8✔
31
    hostpython_prerequisites = ["setuptools>=77"]
8✔
32
    opt_depends = ['libwebp']
8✔
33

34
    def get_recipe_env(self, arch, **kwargs):
8✔
UNCOV
35
        env = super().get_recipe_env(arch, **kwargs)
×
36

37
        # Add math library linkage
38
        env["LDFLAGS"] = env.get("LDFLAGS", "") + " -lm"
×
39

40
        jpeg = self.get_recipe('jpeg', self.ctx)
×
41
        jpeg_inc_dir = jpeg_lib_dir = jpeg.get_build_dir(arch.arch)
×
42
        env["JPEG_ROOT"] = "{}:{}".format(jpeg_lib_dir, jpeg_inc_dir)
×
43

UNCOV
44
        freetype = self.get_recipe('freetype', self.ctx)
×
UNCOV
45
        free_lib_dir = join(freetype.get_build_dir(arch.arch), 'objs', '.libs')
×
UNCOV
46
        free_inc_dir = join(freetype.get_build_dir(arch.arch), 'include')
×
47
        env["FREETYPE_ROOT"] = "{}:{}".format(free_lib_dir, free_inc_dir)
×
48

49
        # harfbuzz is a direct dependency of freetype and we need the proper
50
        # flags to successfully build the Pillow recipe, so we add them here.
UNCOV
51
        harfbuzz = self.get_recipe('harfbuzz', self.ctx)
×
52
        harf_lib_dir = join(harfbuzz.get_build_dir(arch.arch), 'src', '.libs')
×
UNCOV
53
        harf_inc_dir = harfbuzz.get_build_dir(arch.arch)
×
UNCOV
54
        env["HARFBUZZ_ROOT"] = "{}:{}".format(harf_lib_dir, harf_inc_dir)
×
55

56
        env["ZLIB_ROOT"] = f"{arch.ndk_lib_dir_versioned}:{self.ctx.ndk.sysroot_include_dir}"
×
57

58
        # libwebp is an optional dependency, so we add the
59
        # flags if we have it in our `ctx.recipe_build_order`
UNCOV
60
        if 'libwebp' in self.ctx.recipe_build_order:
×
61
            webp = self.get_recipe('libwebp', self.ctx)
×
62
            webp_install = join(
×
63
                webp.get_build_dir(arch.arch), 'installation'
64
            )
UNCOV
65
            env["WEBP_ROOT"] = f"{join(webp_install, 'lib')}:{join(webp_install, 'include')}"
×
UNCOV
66
        return env
×
67

68

69
recipe = PillowRecipe()
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