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
19 changes: 14 additions & 5 deletions c/cassandra-driver/build_info.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
{
"maintainer": "ramnathnayak-ibm",
"maintainer": "Varsha Kumar",
"package_name": "cassandra-driver",
"github_url": "http://github.com/datastax/python-driver",
"version": "3.29.0",
"github_url": "https://github.com/apache/cassandra-python-driver",
"version": "3.30.1",
"default_branch": "master",
"build_script": "cassandra-driver_ubi_9.3.sh",
"build_script": "cassandra-driver_3.30.1_ubi_9.6.sh",
"package_dir": "c/cassandra-driver",
"docker_build": false,
"wheel_build": true,
"validate_build_script": true,
"use_non_root_user": false
"use_non_root_user": false,
"3.30.1":{
"build_script": "cassandra-driver_3.30.1_ubi_9.6.sh"
},
"3.29.0":{
"build_script": "cassandra-driver_ubi_9.3.sh"
},
"*": {
"build_script": "cassandra-driver_3.30.1_ubi_9.6.sh"
}
}
82 changes: 82 additions & 0 deletions c/cassandra-driver/cassandra-driver_3.30.1_ubi_9.6.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
#!/bin/bash -e
# -----------------------------------------------------------------------------
#
# Package : cassandra-driver
# Version : 3.30.1
# Source repo : https://github.com/apache/cassandra-python-driver
# Tested on : UBI:9.6
# Language : Python
# Ci-Check : True
# Script License : Apache License, Version 2 or later
# Maintainer : Varsha Kumar <varsha.kumar@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.
#
# ----------------------------------------------------------------------------
PACKAGE_NAME=cassandra-driver
PACKAGE_VERSION=${1:-3.30.1}
PACKAGE_URL=https://github.com/apache/cassandra-python-driver
PACKAGE_DIR=cassandra-python-driver

# Install dependencies
yum install -y git gcc-toolset-13-gcc gcc-toolset-13-gcc-c++ gcc-toolset-13-gcc-gfortran make wget sudo openssl-devel bzip2-devel krb5-devel libffi-devel zlib-devel python3.13 python3.13-devel cargo rust
python3.13 -m ensurepip --upgrade
export PATH=/opt/rh/gcc-toolset-13/root/usr/bin:$PATH
export LD_LIBRARY_PATH=/opt/rh/gcc-toolset-13/root/usr/lib64:$LD_LIBRARY_PATH

#Install libev
curl -LO https://dist.schmorp.de/libev/Attic/libev-4.33.tar.gz
tar -xzf libev-4.33.tar.gz
cd libev-4.33
export CFLAGS="-fPIC"
export LDFLAGS="-fPIC"
./configure --disable-shared --enable-static
make -j$(nproc)
make install
cd ..

# Clone the repository
git clone $PACKAGE_URL
cd $PACKAGE_DIR
git checkout $PACKAGE_VERSION

#install necessary Python packages
python3.13 -m pip install wheel pytest tox nox mock build gevent eventlet pyopenssl "setuptools<80"
python3.13 -m pip install -r test-requirements.txt

export CASS_DRIVER_LIBEV_INCLUDES="/usr/local/include"
export CASS_DRIVER_LIBEV_LIBS="/usr/local/lib"
export LDFLAGS="-Wl,-Bstatic -lev -Wl,-Bdynamic"
python3.13 setup.py build_ext --inplace

#Install
if ! python3.13 -m pip install . --no-build-isolation ; then
echo "------------------$PACKAGE_NAME:Install_fails-------------------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_Fails"
exit 1
fi

#Skipping some tests as these are parity with intel and some test dependencies are deprecated with python3.11 and python3.12
if ! python3.13 -m pytest tests/unit/ \
-k "not (CloudTests or TestTwistedConnection or _PoolTests or test_timeout_does_not_release_stream_id)" \
--ignore=tests/unit/io/test_libevreactor.py \
--ignore=tests/unit/io/test_asyncioreactor.py \
--ignore=tests/unit/io/test_asyncorereactor.py \
--ignore=tests/unit/cython/test_bytesio.py \
--ignore=tests/unit/cython/test_types.py \
--ignore=tests/unit/cython/test_utils.py -p no:warnings ; then
echo "------------------$PACKAGE_NAME:install_success_but_test_fails---------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Install_success_but_test_Fails"
exit 2
else
echo "------------------$PACKAGE_NAME:install_&_test_both_success-------------------------"
echo "$PACKAGE_URL $PACKAGE_NAME"
echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Pass | Both_Install_and_Test_Success"
exit 0
fi
Loading