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

kivy / python-for-android / 10149015839

29 Jul 2024 05:31PM UTC coverage: 59.055% (-0.02%) from 59.07%
10149015839

push

github

web-flow
Merge pull request #3042 from gonatienza/libsodium-recipe-update

libsodium-recipe-update to url

1048 of 2361 branches covered (44.39%)

Branch coverage included in aggregate %.

4 of 8 new or added lines in 1 file covered. (50.0%)

4854 of 7633 relevant lines covered (63.59%)

2.53 hits per line

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

54.29
/pythonforandroid/recipes/libsodium/__init__.py
1
from pythonforandroid.recipe import Recipe
4✔
2
from pythonforandroid.util import current_directory
4✔
3
from pythonforandroid.logger import shprint
4✔
4
from multiprocessing import cpu_count
4✔
5
import sh
4✔
6
from packaging import version as packaging_version
4✔
7

8

9
class LibsodiumRecipe(Recipe):
4✔
10
    version = '1.0.16'
4✔
11
    url = 'https://github.com/jedisct1/libsodium/releases/download/{}/libsodium-{}.tar.gz'
4✔
12
    depends = []
4✔
13
    patches = ['size_max_fix.patch']
4✔
14
    built_libraries = {'libsodium.so': 'src/libsodium/.libs'}
4✔
15

16
    @property
4✔
17
    def versioned_url(self):
4✔
NEW
18
        asked_version = packaging_version.parse(self.version)
×
NEW
19
        if asked_version > packaging_version.parse('1.0.16'):
×
NEW
20
            return self._url.format(self.version + '-RELEASE', self.version)
×
21
        else:
NEW
22
            return self._url.format(self.version, self.version)
×
23

24
    def build_arch(self, arch):
4✔
25
        env = self.get_recipe_env(arch)
×
26
        with current_directory(self.get_build_dir(arch.arch)):
×
27
            bash = sh.Command('bash')
×
28
            shprint(
×
29
                bash,
30
                'configure',
31
                '--disable-soname-versions',
32
                '--host={}'.format(arch.command_prefix),
33
                '--enable-shared',
34
                _env=env,
35
            )
36
            shprint(sh.make, '-j', str(cpu_count()), _env=env)
×
37

38
    def get_recipe_env(self, arch):
4✔
39
        env = super().get_recipe_env(arch)
×
40
        env['CFLAGS'] += ' -Os'
×
41
        return env
×
42

43

44
recipe = LibsodiumRecipe()
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