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

kivy / python-for-android / 14318575834

07 Apr 2025 08:13PM UTC coverage: 58.902% (-0.2%) from 59.111%
14318575834

Pull #3125

github

web-flow
Merge 2abaa319a into fbd525588
Pull Request #3125: [WIP] Add SDL3 bootstrap

1053 of 2397 branches covered (43.93%)

Branch coverage included in aggregate %.

77 of 146 new or added lines in 12 files covered. (52.74%)

188 existing lines in 2 files now uncovered.

4955 of 7803 relevant lines covered (63.5%)

3.16 hits per line

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

21.74
/pythonforandroid/bootstraps/sdl3/__init__.py
1
from os.path import join
5✔
2

3
import sh
5✔
4

5
from pythonforandroid.toolchain import (
5✔
6
    Bootstrap, shprint, current_directory, info, info_main)
7
from pythonforandroid.util import ensure_dir, rmdir
5✔
8

9

10
class SDL3GradleBootstrap(Bootstrap):
5✔
11
    name = 'sdl3'
5✔
12

13
    conflicts = ['sdl2']
5✔
14

15
    recipe_depends = list(
5✔
16
        set(Bootstrap.recipe_depends).union({'sdl3'})
17
    )
18

19
    def assemble_distribution(self):
5✔
NEW
20
        info_main("# Creating Android project ({})".format(self.name))
×
21

NEW
22
        rmdir(self.dist_dir)
×
NEW
23
        info("Copying SDL3/gradle build")
×
NEW
24
        shprint(sh.cp, "-r", self.build_dir, self.dist_dir)
×
25

26
        # either the build use environment variable (ANDROID_HOME)
27
        # or the local.properties if exists
NEW
28
        with current_directory(self.dist_dir):
×
NEW
29
            with open('local.properties', 'w') as fileh:
×
NEW
30
                fileh.write('sdk.dir={}'.format(self.ctx.sdk_dir))
×
31

NEW
32
        with current_directory(self.dist_dir):
×
NEW
33
            info("Copying Python distribution")
×
34

NEW
35
            self.distribute_javaclasses(self.ctx.javaclass_dir,
×
36
                                        dest_dir=join("src", "main", "java"))
37

NEW
38
            for arch in self.ctx.archs:
×
NEW
39
                python_bundle_dir = join(f'_python_bundle__{arch.arch}', '_python_bundle')
×
NEW
40
                ensure_dir(python_bundle_dir)
×
41

NEW
42
                self.distribute_libs(arch, [self.ctx.get_libs_dir(arch.arch)])
×
NEW
43
                site_packages_dir = self.ctx.python_recipe.create_python_bundle(
×
44
                    join(self.dist_dir, python_bundle_dir), arch)
NEW
45
                if not self.ctx.with_debug_symbols:
×
NEW
46
                    self.strip_libraries(arch)
×
NEW
47
                self.fry_eggs(site_packages_dir)
×
48

NEW
49
            if 'sqlite3' not in self.ctx.recipe_build_order:
×
NEW
50
                with open('blacklist.txt', 'a') as fileh:
×
NEW
51
                    fileh.write('\nsqlite3/*\nlib-dynload/_sqlite3.so\n')
×
52

NEW
53
        super().assemble_distribution()
×
54

55

56
bootstrap = SDL3GradleBootstrap()
5✔
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

© 2025 Coveralls, Inc