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

kivy / python-for-android / 10114759191

26 Jul 2024 04:48PM UTC coverage: 59.07% (-0.05%) from 59.121%
10114759191

push

github

web-flow
Merge pull request #3023 from kengoon/grpcio-recipe

recipes: add new `grpcio` recipe

1046 of 2357 branches covered (44.38%)

Branch coverage included in aggregate %.

8 of 22 new or added lines in 1 file covered. (36.36%)

4851 of 7626 relevant lines covered (63.61%)

2.53 hits per line

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

36.36
/pythonforandroid/recipes/grpcio/__init__.py
1
from pythonforandroid.recipe import PyProjectRecipe, Recipe
4✔
2

3

4
class GrpcioRecipe(PyProjectRecipe):
4✔
5
    version = '1.64.0'
4✔
6
    url = 'https://files.pythonhosted.org/packages/source/g/grpcio/grpcio-{version}.tar.gz'
4✔
7
    depends = ["setuptools", "librt", "libpthread"]
4✔
8
    patches = [
4✔
9
        "comment-getserverbyport-r-args.patch",
10
        "remove-android-log-write.patch",
11
        "use-ndk-zlib-and-openssl-recipe-include.patch"
12
    ]
13

14
    def get_recipe_env(self, arch, **kwargs):
4✔
NEW
15
        env = super().get_recipe_env(arch, **kwargs)
×
NEW
16
        env["NDKPLATFORM"] = "NOTNONE"
×
NEW
17
        env["GRPC_PYTHON_BUILD_SYSTEM_OPENSSL"] = "1"
×
NEW
18
        env["GRPC_PYTHON_BUILD_SYSTEM_ZLIB"] = "1"
×
NEW
19
        env["ZLIB_INCLUDE"] = self.ctx.ndk.sysroot_include_dir
×
20
        # replace -I with a space
NEW
21
        openssl_recipe = Recipe.get_recipe('openssl', self.ctx)
×
NEW
22
        env["SSL_INCLUDE"] = openssl_recipe.include_flags(arch).strip().replace("-I", "")
×
NEW
23
        env["CFLAGS"] += " -U__ANDROID_API__"
×
NEW
24
        env["CFLAGS"] += " -D__ANDROID_API__={}".format(self.ctx.ndk_api)
×
25
        # turn off c++11 warning error of "invalid suffix on literal"
NEW
26
        env["CFLAGS"] += " -Wno-reserved-user-defined-literal"
×
NEW
27
        env["PLATFORM"] = "android"
×
NEW
28
        env["LDFLAGS"] += " -llog -landroid"
×
NEW
29
        env["LDFLAGS"] += openssl_recipe.link_flags(arch)
×
NEW
30
        return env
×
31

32

33
recipe = GrpcioRecipe()
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