Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Currency: added build_script and updated build_info.json for Matplotlib v3.8.0 #5346

Merged
merged 2 commits into from
Feb 4, 2025
Merged
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
10 changes: 5 additions & 5 deletions m/matplotlib/build_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
"wheel_build" : true,
"default_branch": "main",
"package_dir": "m/matplotlib",
"build_script": "matplotlib_3.7.1_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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure build_info.json covers all the build-scripts available for different version. We can't remove 3.7.1 from here, if it was working for that version

},
"*":{
"build_script":"matplotlib_3.7.1_ubi_9.3.sh"
"*": {
"build_script": "matplotlib_ubi_9.3.sh"
}
}

84 changes: 84 additions & 0 deletions m/matplotlib/matplotlib_3.8.0_ubi_9.3.sh
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
#
# 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