From d5e3c261605e7623eb361db8fe3dbf18413d6ecb Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Fri, 9 Apr 2021 14:23:55 +0300 Subject: python3-grpcio: Upgrade 1.36.1 -> 1.37.0 Upgrade to release 1.37.0: - Use boringssl asm optimizations in aarch64 wheel source build. - Clarify Guarantees about grpc.Future Interface. - Use crosscompilation to build python armv7 wheels. - [Aio] Add time_remaining method to ServicerContext. - Standardize all environment variable boolean configuration in python's setup.py. - Crosscompile python aarch64 wheels with dockcross. - Fix Signal Safety Issue. Signed-off-by: Leon Anavi Signed-off-by: Khem Raj Signed-off-by: Trevor Gamblin --- .../python/python3-grpcio/boring_ssl.patch | 50 ++++++++++++++-------- .../python/python3-grpcio_1.36.1.bb | 49 --------------------- .../python/python3-grpcio_1.37.0.bb | 49 +++++++++++++++++++++ 3 files changed, 81 insertions(+), 67 deletions(-) delete mode 100644 meta-python/recipes-devtools/python/python3-grpcio_1.36.1.bb create mode 100644 meta-python/recipes-devtools/python/python3-grpcio_1.37.0.bb (limited to 'meta-python') diff --git a/meta-python/recipes-devtools/python/python3-grpcio/boring_ssl.patch b/meta-python/recipes-devtools/python/python3-grpcio/boring_ssl.patch index 65db4a6ed..d12e35a99 100644 --- a/meta-python/recipes-devtools/python/python3-grpcio/boring_ssl.patch +++ b/meta-python/recipes-devtools/python/python3-grpcio/boring_ssl.patch @@ -1,36 +1,50 @@ +From f71b32eb8a5c173fc5733847437b9485d75bb2e5 Mon Sep 17 00:00:00 2001 +From: Leon Anavi +Date: Fri, 9 Apr 2021 14:06:36 +0300 +Subject: [PATCH] setup.py: Fix determining target platform + Do not poke at the build machine to determine target platform or architecture pass it from environment instead for cross compiling to work Upstream-Status: Inappropriate [OE-Specific] Signed-off-by: Khem Raj +Signed-off-by: Leon Anavi +--- + setup.py | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/setup.py b/setup.py +index c93d419f32..71a944a9d0 100644 --- a/setup.py +++ b/setup.py -@@ -109,6 +109,8 @@ CLASSIFIERS = [ - BUILD_WITH_BORING_SSL_ASM = os.environ.get('GRPC_BUILD_WITH_BORING_SSL_ASM', - True) +@@ -116,6 +116,9 @@ def _env_bool_value(env_name, default): + BUILD_WITH_BORING_SSL_ASM = _env_bool_value('GRPC_BUILD_WITH_BORING_SSL_ASM', + 'True') +BORING_SSL_PLATFORM = os.environ.get('GRPC_BORING_SSL_PLATFORM', -+ True) - # Environment variable to determine whether or not the Cython extension should - # *use* Cython or use the generated C files. Note that this requires the C files - # to have been generated by building first *with* Cython support. Even if this -@@ -306,15 +308,15 @@ asm_key = '' - if BUILD_WITH_BORING_SSL_ASM and not BUILD_WITH_SYSTEM_OPENSSL: ++ 'True') ++ + # Export this environment variable to override the platform variant that will + # be chosen for boringssl assembly optimizations. This option is useful when + # crosscompiling and the host platform as obtained by distutils.utils.get_platform() +@@ -336,13 +339,13 @@ if BUILD_WITH_BORING_SSL_ASM and not BUILD_WITH_SYSTEM_OPENSSL: LINUX_X86_64 = 'linux-x86_64' LINUX_ARM = 'linux-arm' -- if LINUX_X86_64 == util.get_platform(): + LINUX_AARCH64 = 'linux-aarch64' +- if LINUX_X86_64 == boringssl_asm_platform: + if LINUX_X86_64 == BORING_SSL_PLATFORM: asm_key = 'crypto_linux_x86_64' -- elif LINUX_ARM == util.get_platform(): +- elif LINUX_ARM == boringssl_asm_platform: + elif LINUX_ARM == BORING_SSL_PLATFORM: asm_key = 'crypto_linux_arm' -- elif "mac" in util.get_platform() and "x86_64" in util.get_platform(): -+ elif "mac" in BORING_SSL_PLATFORM and "x86_64" in BORING_SSL_PLATFORM: +- elif LINUX_AARCH64 == boringssl_asm_platform: ++ elif LINUX_AARCH64 == BORING_SSL_PLATFORM: + asm_key = 'crypto_linux_aarch64' +- elif "mac" in boringssl_asm_platform and "x86_64" in boringssl_asm_platform: ++ elif "mac" in boringssl_asm_platform and "x86_64" in BORING_SSL_PLATFORM: asm_key = 'crypto_mac_x86_64' else: print("ASM Builds for BoringSSL currently not supported on:", -- util.get_platform()) -+ BORING_SSL_PLATFORM) - if asm_key: - asm_files = grpc_core_dependencies.ASM_SOURCE_FILES[asm_key] - else: +-- +2.17.1 + diff --git a/meta-python/recipes-devtools/python/python3-grpcio_1.36.1.bb b/meta-python/recipes-devtools/python/python3-grpcio_1.36.1.bb deleted file mode 100644 index 13cef537e..000000000 --- a/meta-python/recipes-devtools/python/python3-grpcio_1.36.1.bb +++ /dev/null @@ -1,49 +0,0 @@ -DESCRIPTION = "Google gRPC" -HOMEPAGE = "http://www.grpc.io/" -SECTION = "devel/python" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" - -DEPENDS += "${PYTHON_PN}-protobuf" - -SRC_URI += "file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch" -SRC_URI_append_class-target = " file://ppc-boringssl-support.patch \ - file://riscv64_support.patch \ - file://boring_ssl.patch \ - file://mips_bigendian.patch \ - file://0001-absl-always-use-asm-sgidefs.h.patch \ -" -SRC_URI[sha256sum] = "a66ea59b20f3669df0f0c6a3bd57b985e5b2d1dcf3e4c29819bb8dc232d0fd38" - -RDEPENDS_${PN} = "${PYTHON_PN}-protobuf \ - ${PYTHON_PN}-setuptools \ - ${PYTHON_PN}-six \ -" - -inherit setuptools3 -inherit pypi - -export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY = "1" - -BORING_SSL_PLATFORM_arm = "linux-arm" -BORING_SSL_PLATFORM_x86-64 = "linux-x86_64" -BORING_SSL_PLATFORM ?= "unsupported" -export GRPC_BORING_SSL_PLATFORM = "${BORING_SSL_PLATFORM}" - -BORING_SSL_x86-64 = "1" -BORING_SSL_arm = "1" -BORING_SSL ?= "0" -export GRPC_BUILD_WITH_BORING_SSL_ASM = "${BORING_SSL}" - -GRPC_CFLAGS_append_toolchain-clang = " -fvisibility=hidden -fno-wrapv -fno-exceptions" -export GRPC_PYTHON_CFLAGS = "${GRPC_CFLAGS}" - -CLEANBROKEN = "1" - -BBCLASSEXTEND = "native nativesdk" - -CCACHE_DISABLE = "1" - -# needs vdso support -COMPATIBLE_HOST_libc-musl_powerpc64le = "null" - diff --git a/meta-python/recipes-devtools/python/python3-grpcio_1.37.0.bb b/meta-python/recipes-devtools/python/python3-grpcio_1.37.0.bb new file mode 100644 index 000000000..47fb71120 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-grpcio_1.37.0.bb @@ -0,0 +1,49 @@ +DESCRIPTION = "Google gRPC" +HOMEPAGE = "http://www.grpc.io/" +SECTION = "devel/python" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" + +DEPENDS += "${PYTHON_PN}-protobuf" + +SRC_URI += "file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch" +SRC_URI_append_class-target = " file://ppc-boringssl-support.patch \ + file://riscv64_support.patch \ + file://boring_ssl.patch \ + file://mips_bigendian.patch \ + file://0001-absl-always-use-asm-sgidefs.h.patch \ +" +SRC_URI[sha256sum] = "b3ce16aa91569760fdabd77ca901b2288152eb16941d28edd9a3a75a0c4a8a85" + +RDEPENDS_${PN} = "${PYTHON_PN}-protobuf \ + ${PYTHON_PN}-setuptools \ + ${PYTHON_PN}-six \ +" + +inherit setuptools3 +inherit pypi + +export GRPC_PYTHON_DISABLE_LIBC_COMPATIBILITY = "1" + +BORING_SSL_PLATFORM_arm = "linux-arm" +BORING_SSL_PLATFORM_x86-64 = "linux-x86_64" +BORING_SSL_PLATFORM ?= "unsupported" +export GRPC_BORING_SSL_PLATFORM = "${BORING_SSL_PLATFORM}" + +BORING_SSL_x86-64 = "1" +BORING_SSL_arm = "1" +BORING_SSL ?= "0" +export GRPC_BUILD_WITH_BORING_SSL_ASM = "${BORING_SSL}" + +GRPC_CFLAGS_append_toolchain-clang = " -fvisibility=hidden -fno-wrapv -fno-exceptions" +export GRPC_PYTHON_CFLAGS = "${GRPC_CFLAGS}" + +CLEANBROKEN = "1" + +BBCLASSEXTEND = "native nativesdk" + +CCACHE_DISABLE = "1" + +# needs vdso support +COMPATIBLE_HOST_libc-musl_powerpc64le = "null" + -- cgit v1.2.3-54-g00ecf