Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions g/grpcio/build_info.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"maintainer": "Varsha Kumar",
"maintainer": "SakshiJain0302",
"package_name": "grpcio",
"github_url": "https://github.com/grpc/grpc.git",
"version": "v1.78.0",
Expand All @@ -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"
]
}
}
81 changes: 81 additions & 0 deletions g/grpcio/grpcio_1.83.0_ubi_10.2.sh
Original file line number Diff line number Diff line change
@@ -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 <sakshi.jain16@ibm.com>
#
# 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
Loading