From 0bded5571160daf8f8ba3f27bf022a75641e74ea Mon Sep 17 00:00:00 2001 From: kiranNukal Date: Thu, 23 Jan 2025 10:20:52 +0000 Subject: [PATCH 1/2] added build_script for version 3.8.0 and updated build_info.json --- m/matplotlib/build_info.json | 4 +- m/matplotlib/matplotlib_3.8.0_ubi_9.3.sh | 84 ++++++++++++++++++++++++ 2 files changed, 86 insertions(+), 2 deletions(-) create mode 100644 m/matplotlib/matplotlib_3.8.0_ubi_9.3.sh diff --git a/m/matplotlib/build_info.json b/m/matplotlib/build_info.json index 32c47ecf4d..1efaeded24 100644 --- a/m/matplotlib/build_info.json +++ b/m/matplotlib/build_info.json @@ -6,7 +6,7 @@ "wheel_build" : true, "default_branch": "main", "package_dir": "m/matplotlib", - "build_script": "matplotlib_3.7.1_ubi_9.3.sh", + "build_script": "matplotlib_3.8.0_ubi_9.3.sh", "validate_build_script": true, "use_non_root_user": false, "docker_build": false, @@ -14,7 +14,7 @@ "build_script": "matplotlib_ubi_9.3.sh" }, "*":{ - "build_script":"matplotlib_3.7.1_ubi_9.3.sh" + "build_script":"matplotlib_3.8.0_ubi_9.3.sh" } } diff --git a/m/matplotlib/matplotlib_3.8.0_ubi_9.3.sh b/m/matplotlib/matplotlib_3.8.0_ubi_9.3.sh new file mode 100644 index 0000000000..d754c703e4 --- /dev/null +++ b/m/matplotlib/matplotlib_3.8.0_ubi_9.3.sh @@ -0,0 +1,84 @@ +#!/bin/bash -e +# ----------------------------------------------------------------------------- +# +# Package : matplotlib +# Version : v3.8.0 +# Source repo : https://github.com/matplotlib/matplotlib.git +# Tested on : UBI:9.3 +# Language : Python +# Travis-Check : True +# Script License: Apache License, Version 2 or later +# Maintainer : Sai Kiran Nukala +# +# Disclaimer: This script has been tested in root mode on the 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 a case, please +# contact the "Maintainer" of this script. +# +# ----------------------------------------------------------------------------- + +# Exit immediately if a command exits with a non-zero status +set -e + +echo "Installing dependencies..." +yum install -y python3-pip python3 python python3-devel git gcc-c++ cmake wget +yum install -y openblas-devel ninja-build +yum install -y zlib zlib-devel libjpeg-turbo libjpeg-turbo-devel +echo "Dependencies installed." + +echo "Cloning the $PACKAGE_NAME package..." +# Clone the matplotlib package. +PACKAGE_NAME=matplotlib +PACKAGE_VERSION=${1:-v3.8.0} +PACKAGE_URL=https://github.com/matplotlib/matplotlib.git +git clone $PACKAGE_URL +cd $PACKAGE_NAME/ +git checkout $PACKAGE_VERSION +git submodule update --init +echo "Cloned and checked out to version $PACKAGE_VERSION." + +echo "Downloading and preparing qhull..." +# Download qhull +mkdir -p build +wget 'http://www.qhull.org/download/qhull-2020-src-8.0.2.tgz' +gunzip qhull-2020-src-8.0.2.tgz +tar -xvf qhull-2020-src-8.0.2.tar --no-same-owner +mv qhull-2020.2 build/ +rm -f qhull-2020-src-8.0.2.tar +echo "qhull downloaded and prepared." + +echo "Setting up virtual environment for Python..." +# Setup virtual environment for python +pip install pytest hypothesis build meson pybind11 meson-python +echo "Python environment set up." + +echo "Installing dependencies for $PACKAGE_NAME..." +# Install package dependencies +pip install 'numpy<2' fontTools setuptools-scm contourpy kiwisolver python-dateutil cycler pyparsing pillow certifi +pip install --upgrade setuptools +echo "Dependencies installed." + +echo "Building and installing $PACKAGE_NAME..." +# Build and Install the package (This is dependent on numpy, pillow) +if ! (pip install -e .); 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 +echo "$PACKAGE_NAME installed successfully." + +echo "Running tests for $PACKAGE_NAME..." +# Test the package +if ! (pytest ./lib/matplotlib/tests/test_units.py); then + echo "------------------$PACKAGE_NAME:build_success_but_test_fails---------------------" + echo "$PACKAGE_URL $PACKAGE_NAME" + echo "$PACKAGE_NAME | $PACKAGE_URL | $PACKAGE_VERSION | GitHub | Fail | Build_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 \ No newline at end of file From 1cf6014b1c267bb334575c2a60d2d9f8a008a7ef Mon Sep 17 00:00:00 2001 From: kiranNukal Date: Mon, 27 Jan 2025 19:19:07 +0530 Subject: [PATCH 2/2] Update build_info.json --- m/matplotlib/build_info.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/m/matplotlib/build_info.json b/m/matplotlib/build_info.json index 1efaeded24..97a9a74a8b 100644 --- a/m/matplotlib/build_info.json +++ b/m/matplotlib/build_info.json @@ -6,15 +6,15 @@ "wheel_build" : true, "default_branch": "main", "package_dir": "m/matplotlib", - "build_script": "matplotlib_3.8.0_ubi_9.3.sh", + "build_script": "matplotlib_ubi_9.3.sh", "validate_build_script": true, "use_non_root_user": false, "docker_build": false, - "v3.9.2": { - "build_script": "matplotlib_ubi_9.3.sh" - }, - "*":{ + "v3.7.1,v3.8.0":{ "build_script":"matplotlib_3.8.0_ubi_9.3.sh" + }, + "*": { + "build_script": "matplotlib_ubi_9.3.sh" } }