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

kivy / python-for-android / 14430251794

13 Apr 2025 02:11PM UTC coverage: 59.204% (+0.06%) from 59.141%
14430251794

Pull #3139

github

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

1054 of 2375 branches covered (44.38%)

Branch coverage included in aggregate %.

8 of 16 new or added lines in 2 files covered. (50.0%)

1 existing line in 1 file now uncovered.

4957 of 7778 relevant lines covered (63.73%)

2.54 hits per line

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

55.56
/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
        "use_cython.patch",
17
        ('genericndkbuild_jnienv_getter.patch', will_build('genericndkbuild')),
18
        ('sdl3_jnienv_getter.patch', will_build('sdl3')),
19
    ]
20

21
    def get_recipe_env(self, arch, **kwargs):
4✔
NEW
22
        env = super().get_recipe_env(arch, **kwargs)
×
23

24
        # Taken from CythonRecipe
NEW
25
        env['LDFLAGS'] = env['LDFLAGS'] + ' -L{} '.format(
×
26
            self.ctx.get_libs_dir(arch.arch) +
27
            ' -L{} '.format(self.ctx.libs_dir) +
28
            ' -L{}'.format(join(self.ctx.bootstrap.build_dir, 'obj', 'local',
29
                                arch.arch)))
NEW
30
        env['LDSHARED'] = env['CC'] + ' -shared'
×
NEW
31
        env['LIBLINK'] = 'NOTNONE'
×
32

33
        # NDKPLATFORM is our switch for detecting Android platform, so can't be None
34
        env['NDKPLATFORM'] = "NOTNONE"
×
35
        return env
×
36

37
    def postbuild_arch(self, arch):
4✔
38
        super().postbuild_arch(arch)
×
39
        info('Copying pyjnius java class to classes build dir')
×
40
        with current_directory(self.get_build_dir(arch.arch)):
×
41
            shprint(sh.cp, '-a', join('jnius', 'src', 'org'), self.ctx.javaclass_dir)
×
42

43

44
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