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

kivy / python-for-android / 11299591582

11 Oct 2024 09:34PM UTC coverage: 59.076% (-0.05%) from 59.125%
11299591582

Pull #3071

github

web-flow
Merge de2311bce into 2a4dd96a1
Pull Request #3071: Added lz4

1046 of 2362 branches covered (44.28%)

Branch coverage included in aggregate %.

12 of 20 new or added lines in 1 file covered. (60.0%)

4890 of 7686 relevant lines covered (63.62%)

2.53 hits per line

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

43.75
/pythonforandroid/recipes/lz4/__init__.py
1
from pythonforandroid.recipe import Recipe
4✔
2
from pythonforandroid.logger import shprint
4✔
3
from pythonforandroid.toolchain import current_directory
4✔
4
from os.path import join
4✔
5
import sh
4✔
6
import os
4✔
7

8

9
class LibLz4Recipe(Recipe):
4✔
10
    name = 'liblz4'
4✔
11
    version = '1.9.4'  # Update to the desired version
4✔
12
    url = 'https://github.com/lz4/lz4/archive/refs/tags/v{version}.tar.gz'
4✔
13
    built_libraries = {'liblz4.a': '.'}
4✔
14

15
    def build_arch(self, arch):
4✔
NEW
16
        super().build_arch(arch)
×
NEW
17
        env = self.get_recipe_env(arch)
×
NEW
18
        build_dir = self.get_build_dir(arch.arch)
×
NEW
19
        lib_dir = self.ctx.get_libs_dir(arch.arch)
×
NEW
20
        include_dir = join(self.ctx.get_python_install_dir(), 'include', 'lz4')
×
21

22
        # Ensure include directory exists
NEW
23
        if not os.path.exists(include_dir):
×
NEW
24
            os.makedirs(include_dir)
×
25

26
        # Build the library
NEW
27
        with current_directory(join(build_dir, 'lib')):
×
28
            # Clean previous builds
29
            shprint(sh.make, 'clean', _env=env)
×
30
            # Build the static library
31
            shprint(sh.make, 'liblz4.a', _env=env)
×
32
            # Copy the static library
33
            shprint(sh.cp, '-v', 'liblz4.a', lib_dir)
×
34
            # Copy headers
35
            shprint(sh.cp, '-v', 'lz4.h', include_dir)
×
36

37
    def get_recipe_env(self, arch):
4✔
38
        env = super().get_recipe_env(arch)
×
39
        # Set compiler flags if needed
40
        return env
×
41

42

43
recipe = LibLz4Recipe()
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

© 2025 Coveralls, Inc