From 04f5ce0c418ab6134a17d089554dbd7499377f00 Mon Sep 17 00:00:00 2001 From: Sakshi Jain Date: Mon, 24 Aug 2026 18:54:57 +0530 Subject: [PATCH] Updated for py3.14 and added support ubi10.2 --- g/grpcio/build_info.json | 7 ++- g/grpcio/grpcio_1.83.0_ubi_10.2.sh | 81 ++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 g/grpcio/grpcio_1.83.0_ubi_10.2.sh diff --git a/g/grpcio/build_info.json b/g/grpcio/build_info.json index cf0f2908aa..e01f88ef6c 100644 --- a/g/grpcio/build_info.json +++ b/g/grpcio/build_info.json @@ -1,5 +1,5 @@ { - "maintainer": "Varsha Kumar", + "maintainer": "SakshiJain0302", "package_name": "grpcio", "github_url": "https://github.com/grpc/grpc.git", "version": "v1.78.0", @@ -23,6 +23,9 @@ "build_script":"grpcio_1.81.1_ubi_9.6.sh" }, "v1.*.*": { - "build_script": "grpcio_1.81.1_ubi_9.6.sh" + "build_script": [ + "grpcio_1.81.1_ubi_9.6.sh", + "grpcio_1.83.0_ubi_10.2.sh" + ] } } diff --git a/g/grpcio/grpcio_1.83.0_ubi_10.2.sh b/g/grpcio/grpcio_1.83.0_ubi_10.2.sh new file mode 100644 index 0000000000..b452670293 --- /dev/null +++ b/g/grpcio/grpcio_1.83.0_ubi_10.2.sh @@ -0,0 +1,81 @@ +#!/bin/bash -e +# ----------------------------------------------------------------------------- +# +# Package : grpcio +# Version : v1.83.0 +# Source repo : https://github.com/grpc/grpc.git (# For grpcio - https://github.com.mcas.ms/grpc/grpc/tree/master/src/python/grpcio) +# Tested on : UBI:10.2 +# Language : C++, Python, C, Starlark, Shell, Ruby +# Ci-Check : True +# Script License: Apache License, Version 2 or later +# Maintainer : Sakshi Jain +# +# Disclaimer: This script has been tested in root mode on given +# ========== platform using the mentioned version of the package. +# It may not work as expected with newer versions of the +# package and/or distribution. In such case, please +# contact "Maintainer" of this script. +# +# ---------------------------------------------------------------------------- + +# Install dependencies +yum install -y python3.14 python3.14-devel python3.14-pip python3.14-setuptools openssl openssl-devel git gcc-toolset-15 gcc-toolset-15-gcc-c++ + +# Clone the grpc package. +PACKAGE_NAME=grpc +PACKAGE_VERSION=${1:-v1.83.0} +PACKAGE_URL=https://github.com/grpc/grpc.git +PACKAGE_DIR=grpc +CURRENT_DIR="${PWD}" + +git clone $PACKAGE_URL +cd $PACKAGE_NAME +git checkout $PACKAGE_VERSION +git submodule update --init --recursive + +export GRPC_PYTHON_BUILD_SYSTEM_OPENSSL=1 +export GRPC_PYTHON_BUILD_WITH_CYTHON=1 +export PATH="/opt/rh/gcc-toolset-15/root/usr/bin:${PATH}" + +python3.14 -m pip install -r requirements.txt + +[[ "$(printf "%s\n" "$PACKAGE_VERSION" v1.62.3 | sort -V | head -n1)" == "$PACKAGE_VERSION" ]] && python3.14 -m pip install --force-reinstall Cython==0.29.37 + +# Install the package +python3.14 -m pip install . --no-build-isolation + +if [ $? == 0 ]; then + echo "------------------$PACKAGE_NAME::Build_Pass---------------------" + echo "$PACKAGE_VERSION $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | Pass | Build_Success" +else + echo "------------------$PACKAGE_NAME::Build_Fail-------------------------" + echo "$PACKAGE_VERSION $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | Fail | Build_Fail" + exit 1 +fi + +if ! python3.14 -m build --wheel --no-isolation --outdir="$CURRENT_DIR/"; then + echo "============ Wheel Creation Failed for Python $PYTHON_VERSION (without isolation) =================" + echo "Attempting to build with isolation..." + + if ! python3.14 -m build --wheel --outdir="$CURRENT_DIR/"; then + echo "============ Wheel Creation Failed for Python $PYTHON_VERSION =================" + fi +fi + +# Test the package +cd .. +python3.14 -c "import grpc; import grpc._cython; import grpc._cython._cygrpc; import grpc.beta; import grpc.framework; import grpc.framework.common; import grpc.framework.foundation; import grpc.framework.interfaces; import grpc.framework.interfaces.base; import grpc.framework.interfaces.face; print('All modules imported successfully')" + +if [ $? == 0 ]; then + echo "------------------$PACKAGE_NAME::Test_Pass---------------------" + echo "$PACKAGE_VERSION $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | Pass | Test_Success" + +else + echo "------------------$PACKAGE_NAME::Test_Fail-------------------------" + echo "$PACKAGE_VERSION $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | Fail | Test_Fail" + exit 2 +fi \ No newline at end of file