diff --git a/g/gmpy2/build_info.json b/g/gmpy2/build_info.json index 6c5e118078..f0d29b2ef2 100644 --- a/g/gmpy2/build_info.json +++ b/g/gmpy2/build_info.json @@ -1,5 +1,5 @@ { - "maintainer": "Harithanagothu2", + "maintainer": "shivansh-ibm", "package_name": "gmpy2", "github_url": "https://github.com/aleaxit/gmpy.git", "version": "gmpy2-2.1.2", @@ -10,6 +10,12 @@ "docker_build": false, "validate_build_script": true, "use_non_root_user": "false", + "v2.*.*": { + "build_script": [ + "gmpy2_ubi_9.3.sh", + "gmpy2_ubi_10.1.sh" + ] + }, "gmpy2-*.*.*": { "build_script": "gmpy2_ubi_9.3.sh" } diff --git a/g/gmpy2/gmpy2_ubi_10.1.sh b/g/gmpy2/gmpy2_ubi_10.1.sh new file mode 100644 index 0000000000..f4d5a04278 --- /dev/null +++ b/g/gmpy2/gmpy2_ubi_10.1.sh @@ -0,0 +1,55 @@ +#!/bin/bash -e +# ---------------------------------------------------------------------------- +# +# Package : gmpy2 +# Version : gmpy2-2.2.1 +# Source repo : https://github.com/aleaxit/gmpy.git +# Tested on : UBI:10.1 +# Language : Python +# Ci-Check : True +# Script License: Apache License, Version 2 or later +# Maintainer : Shivansh Sharma +# +# 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. +# +# ---------------------------------------------------------------------------- + +#variables +PACKAGE_NAME=gmpy2 +PACKAGE_VERSION=${1:-v2.2.1} +PACKAGE_URL=https://github.com/aleaxit/gmpy.git +# Install dependencies and tools. +yum install -y wget gcc gcc-c++ gcc-gfortran git make python3.12-devel openssl-devel gmp-devel.ppc64le mpfr-devel.ppc64le libmpc-devel.ppc64le + +#clone repository +git clone $PACKAGE_URL +cd gmpy +git checkout $PACKAGE_VERSION + +python3.12 -m pip install cython +python3.12 -m pip --verbose install --editable .[docs,tests] + +#install +if ! (python3.12 -m pip install .) ; 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 + +#test +if ! python3.12 test_cython/runtests.py; 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