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

kivy / python-for-android / 14421698601

12 Apr 2025 05:10PM UTC coverage: 59.196% (+0.06%) from 59.141%
14421698601

Pull #3139

github

web-flow
Merge bf75b230a into 58d148bf8
Pull Request #3139: `kivy` and `pyjnius`: switch to `PyProjectRecipe`

1054 of 2373 branches covered (44.42%)

Branch coverage included in aggregate %.

8 of 19 new or added lines in 2 files covered. (42.11%)

3 existing lines in 2 files now uncovered.

4952 of 7773 relevant lines covered (63.71%)

2.54 hits per line

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

53.57
/pythonforandroid/recipes/pyjnius/__init__.py
1
from pythonforandroid.recipe import PyProjectRecipe
4✔
2
from pythonforandroid.toolchain import shprint, current_directory, info
4✔
3
from pythonforandroid.patching import will_build
4✔
4
import sh
4✔
5
from os.path import join
4✔
6

7

8
class PyjniusRecipe(PyProjectRecipe):
4✔
9
    version = '1.6.1'
4✔
10
    url = 'https://github.com/kivy/pyjnius/archive/{version}.zip'
4✔
11
    name = 'pyjnius'
4✔
12
    depends = [('genericndkbuild', 'sdl2', 'sdl3'), 'six']
4✔
13
    site_packages_name = 'jnius'
4✔
14

15
    patches = [
4✔
16
        ('sdl3_jnienv_getter.patch', will_build('sdl3')),
17
        "use_cython.patch",
18
        "common.patch",
19
    ]
20

21
    def get_recipe_env(self, arch, **kwargs):
4✔
NEW
22
        env = super().get_recipe_env(arch, **kwargs)
×
23
        # NDKPLATFORM is our switch for detecting Android platform, so can't be None
24
        env['NDKPLATFORM'] = "NOTNONE"
×
NEW
25
        env['LIBLINK'] = "NOTNONE"
×
NEW
26
        env["ANDROID_PYJNIUS_CYTHON_3"] = "1"
×
NEW
27
        sdl_recipe = self.get_recipe(f"sdl{'3' if 'sdl3' in self.ctx.recipe_build_order else '2'}", self.ctx)
×
NEW
28
        env["LDFLAGS"] += " -L" + join(sdl_recipe.get_build_dir(arch.arch), "../..", "libs", arch.arch)
×
UNCOV
29
        return env
×
30

31
    def postbuild_arch(self, arch):
4✔
32
        super().postbuild_arch(arch)
×
33
        info('Copying pyjnius java class to classes build dir')
×
34
        with current_directory(self.get_build_dir(arch.arch)):
×
35
            shprint(sh.cp, '-a', join('jnius', 'src', 'org'), self.ctx.javaclass_dir)
×
36

37

38
recipe = PyjniusRecipe()
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