From 17bdcca2cb1269d75628c6675726965773da68f6 Mon Sep 17 00:00:00 2001 From: Yogita Kulkarni Date: Tue, 25 Aug 2026 14:30:23 +0530 Subject: [PATCH 1/6] Added script for matplotlib on ubi 1.2 with python 3.14 --- m/matplotlib/matplotlib_3.10.1_ubi_310.2.sh | 133 ++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 m/matplotlib/matplotlib_3.10.1_ubi_310.2.sh diff --git a/m/matplotlib/matplotlib_3.10.1_ubi_310.2.sh b/m/matplotlib/matplotlib_3.10.1_ubi_310.2.sh new file mode 100644 index 0000000000..0e2e2eac28 --- /dev/null +++ b/m/matplotlib/matplotlib_3.10.1_ubi_310.2.sh @@ -0,0 +1,133 @@ +#!/bin/bash -e +# ----------------------------------------------------------------------------- +# +# Package : matplotlib +# Version : v3.10.1 +# Source repo : https://github.com/matplotlib/matplotlib.git +# Tested on : UBI:10.2 +# Language : Python, C++, Jupyter Notebook +# Ci-Check : True +# Script License: Apache License, Version 2 or later +# Maintainer : Yogita Kulkarni +# +# 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_DIR="matplotlib" +PACKAGE_NAME="matplotlib" +PACKAGE_VERSION=${1:-v3.10.1} +PACKAGE_URL="https://github.com/matplotlib/matplotlib.git" +CURRENT_DIR="$(pwd)" +echo "Building ${PACKAGE_NAME} ${PACKAGE_VERSION}" + +# -- System dependencies ------------------------------------------------------ +dnf install -y \ + gcc-toolset-15 \ + git \ + python3.14 \ + python3.14-devel \ + python3.14-pip \ + libjpeg-turbo-devel \ + zlib-devel \ + libpng-devel \ + freetype-devel \ + lcms2-devel \ + libtiff-devel \ + libwebp-devel \ + openjpeg2-devel + +if [[ -f /opt/rh/gcc-toolset-15/enable ]]; then + source /opt/rh/gcc-toolset-15/enable +elif [[ -d /opt/rh/gcc-toolset-15/root/usr/bin ]]; then + export PATH="/opt/rh/gcc-toolset-15/root/usr/bin:$PATH" + export LD_LIBRARY_PATH="/opt/rh/gcc-toolset-15/root/usr/lib64:${LD_LIBRARY_PATH:-}" +else + echo "ERROR: gcc-toolset-15 not found" + exit 1 +fi +gcc --version + +# Compiler hints — help Pillow's setup.py locate system image headers +export CFLAGS="-I/usr/include" +export LDFLAGS="-L/usr/lib64" + +python3.14 -m pip install --upgrade pip wheel build setuptools + +# Clone and checkout +rm -rf "$PACKAGE_DIR" +git clone "$PACKAGE_URL" +cd "$PACKAGE_DIR" +git checkout "$PACKAGE_VERSION" +git submodule update --init --depth 1 + +# -- Build wheel -------------------------------------------------------------- +python3.14 -m build --wheel --outdir "${CURRENT_DIR}/dist/" + +WHEEL=$(find "${CURRENT_DIR}/dist" -name "${PACKAGE_NAME}-*.whl" | head -1) +if [ -z "$WHEEL" ]; then + echo "ERROR: wheel not found after build" + exit 1 +fi +echo "Wheel: $WHEEL" + +# -- Install ------------------------------------------------------------------ +python3.14 -m pip install "$WHEEL" +cd $CURRENT_DIR + +# -- Tests -------------------------------------------------------------------- +python3.14 - << 'PYEOF' +import sys + +# 1. Import and version check +import matplotlib +assert matplotlib.__version__ == "3.10.1", f"Unexpected version: {matplotlib.__version__}" +print(f"PASS import matplotlib {matplotlib.__version__}") + +# 2. C extension sanity check +import matplotlib._c_internal_utils +print("PASS C extension loaded") + +# 3. Headless render — no display required +import matplotlib +matplotlib.use("Agg") +import matplotlib.pyplot as plt +import numpy as np +import io + +fig, ax = plt.subplots() +ax.plot(np.linspace(0, 2 * np.pi, 100), np.sin(np.linspace(0, 2 * np.pi, 100))) +ax.set_title("smoke test") +buf = io.BytesIO() +fig.savefig(buf, format="png") +plt.close(fig) +assert buf.tell() > 0 +print("PASS headless PNG render") + +# 4. Key sub-packages importable +import matplotlib.pyplot +import matplotlib.patches +import matplotlib.colors +import matplotlib.ticker +import matplotlib.dates +print("PASS key sub-packages importable") + +print("\nAll tests passed.") +sys.exit(0) +PYEOF + +if [ $? -ne 0 ]; 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 \ No newline at end of file From 1453af360296b174bc8346916ab2a055b1b350b5 Mon Sep 17 00:00:00 2001 From: Yogita-Kulkarni19 Date: Wed, 26 Aug 2026 16:24:38 +0530 Subject: [PATCH 2/6] Added build script for matplotlib 3.11.0 --- m/matplotlib/matplotlib_3.11.0_ubi_310.2.sh | 140 ++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 m/matplotlib/matplotlib_3.11.0_ubi_310.2.sh diff --git a/m/matplotlib/matplotlib_3.11.0_ubi_310.2.sh b/m/matplotlib/matplotlib_3.11.0_ubi_310.2.sh new file mode 100644 index 0000000000..cc21d90579 --- /dev/null +++ b/m/matplotlib/matplotlib_3.11.0_ubi_310.2.sh @@ -0,0 +1,140 @@ +#!/bin/bash -e +# ----------------------------------------------------------------------------- +# +# Package : matplotlib +# Version : v3.11.0 +# Source repo : https://github.com/matplotlib/matplotlib.git +# Tested on : UBI:10.2 +# Language : Python, C++, Jupyter Notebook +# Ci-Check : True +# Script License: Apache License, Version 2 or later +# Maintainer : Yogita Kulkarni +# +# 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_DIR="matplotlib" +PACKAGE_NAME="matplotlib" +PACKAGE_VERSION=${1:-v3.11.0} +PACKAGE_URL="https://github.com/matplotlib/matplotlib.git" +CURRENT_DIR="$(pwd)" +echo "Building ${PACKAGE_NAME} ${PACKAGE_VERSION}" + +# -- System dependencies ------------------------------------------------------ +dnf install -y \ + gcc-toolset-15 \ + git \ + python3.14 \ + python3.14-devel \ + python3.14-pip \ + libjpeg-turbo-devel \ + zlib-devel \ + libpng-devel \ + freetype-devel \ + lcms2-devel \ + libtiff-devel \ + libwebp-devel \ + openjpeg2-devel + +if [[ -f /opt/rh/gcc-toolset-15/enable ]]; then + source /opt/rh/gcc-toolset-15/enable +elif [[ -d /opt/rh/gcc-toolset-15/root/usr/bin ]]; then + export PATH="/opt/rh/gcc-toolset-15/root/usr/bin:$PATH" + export LD_LIBRARY_PATH="/opt/rh/gcc-toolset-15/root/usr/lib64:${LD_LIBRARY_PATH:-}" +else + echo "ERROR: gcc-toolset-15 not found" + exit 1 +fi +gcc --version + +# Compiler hints — help Pillow's setup.py locate system image headers +export CFLAGS="-I/usr/include" +export LDFLAGS="-L/usr/lib64" + +python3.14 -m pip install --upgrade pip wheel build setuptools + +# Clone and checkout +rm -rf "$PACKAGE_DIR" +git clone "$PACKAGE_URL" +cd "$PACKAGE_DIR" +git checkout "$PACKAGE_VERSION" +git submodule update --init --depth 1 + +# -- Build wheel -------------------------------------------------------------- +DIST_DIR="${CURRENT_DIR}/dist" +[ "$CURRENT_DIR" = "/" ] && DIST_DIR="/dist" +mkdir -p "$DIST_DIR" +python3.14 -m build --wheel --outdir "$DIST_DIR" + +WHEEL=$(find "$DIST_DIR" -name "${PACKAGE_NAME}-*.whl" | head -1) +if [ -z "$WHEEL" ]; then + echo "ERROR: wheel not found after build" + exit 1 +fi +echo "Wheel: $WHEEL" + +# -- Install ------------------------------------------------------------------ +cd "$CURRENT_DIR" +# Pre-install numpy so pip does not build it from source as a dependency +python3.14 -m pip install numpy +# Force-reinstall to ensure any previously installed matplotlib is replaced +python3.14 -m pip install --force-reinstall "$WHEEL" + +# -- Tests -------------------------------------------------------------------- +cd /tmp +python3.14 - << 'PYEOF' +import sys + +# 1. Import and version check +import matplotlib +assert matplotlib.__version__ == "3.11.0", f"Unexpected version: {matplotlib.__version__}" +print(f"PASS import matplotlib {matplotlib.__version__}") + +# 2. C extension sanity check +import matplotlib._c_internal_utils +print("PASS C extension loaded") + +# 3. Headless render — no display required +import matplotlib +matplotlib.use("Agg") +import matplotlib.pyplot as plt +import numpy as np +import io + +fig, ax = plt.subplots() +ax.plot(np.linspace(0, 2 * np.pi, 100), np.sin(np.linspace(0, 2 * np.pi, 100))) +ax.set_title("smoke test") +buf = io.BytesIO() +fig.savefig(buf, format="png") +plt.close(fig) +assert buf.tell() > 0 +print("PASS headless PNG render") + +# 4. Key sub-packages importable +import matplotlib.pyplot +import matplotlib.patches +import matplotlib.colors +import matplotlib.ticker +import matplotlib.dates +print("PASS key sub-packages importable") + +print("\nAll tests passed.") +sys.exit(0) +PYEOF + +if [ $? -ne 0 ]; 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 From 9a2f82c294ad92597bde0ce574ba7c04f2fe88df Mon Sep 17 00:00:00 2001 From: Yogita-Kulkarni19 Date: Tue, 1 Sep 2026 15:49:45 +0530 Subject: [PATCH 3/6] Build script for matplotlib 3.11 on ubi 10.2 with python 3.14 --- m/matplotlib/build_info.json | 4 +- m/matplotlib/matplotlib_3.10.1_ubi_310.2.sh | 133 ------------------ ...310.2.sh => matplotlib_3.11.0_ubi_10.2.sh} | 0 3 files changed, 2 insertions(+), 135 deletions(-) delete mode 100644 m/matplotlib/matplotlib_3.10.1_ubi_310.2.sh rename m/matplotlib/{matplotlib_3.11.0_ubi_310.2.sh => matplotlib_3.11.0_ubi_10.2.sh} (100%) diff --git a/m/matplotlib/build_info.json b/m/matplotlib/build_info.json index 1921784f89..082047abc8 100644 --- a/m/matplotlib/build_info.json +++ b/m/matplotlib/build_info.json @@ -14,10 +14,10 @@ "build_script":"matplotlib_3.8.0_ubi_9.3.sh" }, "v3.11.0":{ - "build_script":"matplotlib_3.11.0_ubi_9.6.sh" + "build_script":"matplotlib_3.11.0_ubi_10.2.sh" }, "*": { - "build_script":"matplotlib_3.11.0_ubi_9.6.sh" + "build_script":"matplotlib_3.11.0_ubi_10.2.sh" } } diff --git a/m/matplotlib/matplotlib_3.10.1_ubi_310.2.sh b/m/matplotlib/matplotlib_3.10.1_ubi_310.2.sh deleted file mode 100644 index 0e2e2eac28..0000000000 --- a/m/matplotlib/matplotlib_3.10.1_ubi_310.2.sh +++ /dev/null @@ -1,133 +0,0 @@ -#!/bin/bash -e -# ----------------------------------------------------------------------------- -# -# Package : matplotlib -# Version : v3.10.1 -# Source repo : https://github.com/matplotlib/matplotlib.git -# Tested on : UBI:10.2 -# Language : Python, C++, Jupyter Notebook -# Ci-Check : True -# Script License: Apache License, Version 2 or later -# Maintainer : Yogita Kulkarni -# -# 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_DIR="matplotlib" -PACKAGE_NAME="matplotlib" -PACKAGE_VERSION=${1:-v3.10.1} -PACKAGE_URL="https://github.com/matplotlib/matplotlib.git" -CURRENT_DIR="$(pwd)" -echo "Building ${PACKAGE_NAME} ${PACKAGE_VERSION}" - -# -- System dependencies ------------------------------------------------------ -dnf install -y \ - gcc-toolset-15 \ - git \ - python3.14 \ - python3.14-devel \ - python3.14-pip \ - libjpeg-turbo-devel \ - zlib-devel \ - libpng-devel \ - freetype-devel \ - lcms2-devel \ - libtiff-devel \ - libwebp-devel \ - openjpeg2-devel - -if [[ -f /opt/rh/gcc-toolset-15/enable ]]; then - source /opt/rh/gcc-toolset-15/enable -elif [[ -d /opt/rh/gcc-toolset-15/root/usr/bin ]]; then - export PATH="/opt/rh/gcc-toolset-15/root/usr/bin:$PATH" - export LD_LIBRARY_PATH="/opt/rh/gcc-toolset-15/root/usr/lib64:${LD_LIBRARY_PATH:-}" -else - echo "ERROR: gcc-toolset-15 not found" - exit 1 -fi -gcc --version - -# Compiler hints — help Pillow's setup.py locate system image headers -export CFLAGS="-I/usr/include" -export LDFLAGS="-L/usr/lib64" - -python3.14 -m pip install --upgrade pip wheel build setuptools - -# Clone and checkout -rm -rf "$PACKAGE_DIR" -git clone "$PACKAGE_URL" -cd "$PACKAGE_DIR" -git checkout "$PACKAGE_VERSION" -git submodule update --init --depth 1 - -# -- Build wheel -------------------------------------------------------------- -python3.14 -m build --wheel --outdir "${CURRENT_DIR}/dist/" - -WHEEL=$(find "${CURRENT_DIR}/dist" -name "${PACKAGE_NAME}-*.whl" | head -1) -if [ -z "$WHEEL" ]; then - echo "ERROR: wheel not found after build" - exit 1 -fi -echo "Wheel: $WHEEL" - -# -- Install ------------------------------------------------------------------ -python3.14 -m pip install "$WHEEL" -cd $CURRENT_DIR - -# -- Tests -------------------------------------------------------------------- -python3.14 - << 'PYEOF' -import sys - -# 1. Import and version check -import matplotlib -assert matplotlib.__version__ == "3.10.1", f"Unexpected version: {matplotlib.__version__}" -print(f"PASS import matplotlib {matplotlib.__version__}") - -# 2. C extension sanity check -import matplotlib._c_internal_utils -print("PASS C extension loaded") - -# 3. Headless render — no display required -import matplotlib -matplotlib.use("Agg") -import matplotlib.pyplot as plt -import numpy as np -import io - -fig, ax = plt.subplots() -ax.plot(np.linspace(0, 2 * np.pi, 100), np.sin(np.linspace(0, 2 * np.pi, 100))) -ax.set_title("smoke test") -buf = io.BytesIO() -fig.savefig(buf, format="png") -plt.close(fig) -assert buf.tell() > 0 -print("PASS headless PNG render") - -# 4. Key sub-packages importable -import matplotlib.pyplot -import matplotlib.patches -import matplotlib.colors -import matplotlib.ticker -import matplotlib.dates -print("PASS key sub-packages importable") - -print("\nAll tests passed.") -sys.exit(0) -PYEOF - -if [ $? -ne 0 ]; 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 \ No newline at end of file diff --git a/m/matplotlib/matplotlib_3.11.0_ubi_310.2.sh b/m/matplotlib/matplotlib_3.11.0_ubi_10.2.sh similarity index 100% rename from m/matplotlib/matplotlib_3.11.0_ubi_310.2.sh rename to m/matplotlib/matplotlib_3.11.0_ubi_10.2.sh From 957d0490a5259388cbd0c34967c1226abd731ca2 Mon Sep 17 00:00:00 2001 From: Yogita-Kulkarni19 Date: Wed, 2 Sep 2026 12:30:27 +0530 Subject: [PATCH 4/6] corrected version info --- m/matplotlib/build_info.json | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/m/matplotlib/build_info.json b/m/matplotlib/build_info.json index 082047abc8..edfe2c3256 100644 --- a/m/matplotlib/build_info.json +++ b/m/matplotlib/build_info.json @@ -1,23 +1,28 @@ { - "maintainer": "Ryder Salinas ", + "maintainer": "Yogita Kulkarni ", "package_name": "matplotlib", "github_url": "https://github.com/matplotlib/matplotlib.git", "version": "v3.11.0", "wheel_build" : true, "default_branch": "main", "package_dir": "m/matplotlib", - "build_script": "matplotlib_3.11.0_ubi_9.6.sh", + "build_script": "matplotlib_3.11.0_ubi_10.2.sh", "validate_build_script": true, "use_non_root_user": false, "docker_build": false, - "v3.7.1,v3.8.0":{ + "v3.7.1,v3.8.0": { "build_script":"matplotlib_3.8.0_ubi_9.3.sh" }, - "v3.11.0":{ - "build_script":"matplotlib_3.11.0_ubi_10.2.sh" + "v3.11.0": { + "build_script": [ + "matplotlib_3.11.0_ubi_9.6.sh", + "matplotlib_3.11.0_ubi_10.2.sh" + ] }, "*": { - "build_script":"matplotlib_3.11.0_ubi_10.2.sh" + "build_script": [ + "matplotlib_3.11.0_ubi_9.6.sh", + "matplotlib_3.11.0_ubi_10.2.sh" + ] } } - From 267c338d219556014cdf77ac019756abad078c27 Mon Sep 17 00:00:00 2001 From: Yogita-Kulkarni19 Date: Wed, 2 Sep 2026 15:06:25 +0530 Subject: [PATCH 5/6] Removed BOM character --- m/matplotlib/matplotlib_3.11.0_ubi_10.2.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/m/matplotlib/matplotlib_3.11.0_ubi_10.2.sh b/m/matplotlib/matplotlib_3.11.0_ubi_10.2.sh index cc21d90579..13ca3bc6c6 100644 --- a/m/matplotlib/matplotlib_3.11.0_ubi_10.2.sh +++ b/m/matplotlib/matplotlib_3.11.0_ubi_10.2.sh @@ -1,4 +1,4 @@ -#!/bin/bash -e +#!/bin/bash -e # ----------------------------------------------------------------------------- # # Package : matplotlib @@ -52,7 +52,7 @@ else fi gcc --version -# Compiler hints — help Pillow's setup.py locate system image headers +# Compiler hints - help Pillow's setup.py locate system image headers export CFLAGS="-I/usr/include" export LDFLAGS="-L/usr/lib64" @@ -99,7 +99,7 @@ print(f"PASS import matplotlib {matplotlib.__version__}") import matplotlib._c_internal_utils print("PASS C extension loaded") -# 3. Headless render — no display required +# 3. Headless render - no display required import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt From 60a229905b6953bc54c0d309275ed37f6286a0cd Mon Sep 17 00:00:00 2001 From: Yogita-Kulkarni19 Date: Wed, 2 Sep 2026 15:39:52 +0530 Subject: [PATCH 6/6] Changed numpy version to 2.5.0 in testcase section --- m/matplotlib/matplotlib_3.11.0_ubi_10.2.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/m/matplotlib/matplotlib_3.11.0_ubi_10.2.sh b/m/matplotlib/matplotlib_3.11.0_ubi_10.2.sh index 13ca3bc6c6..7306b088c8 100644 --- a/m/matplotlib/matplotlib_3.11.0_ubi_10.2.sh +++ b/m/matplotlib/matplotlib_3.11.0_ubi_10.2.sh @@ -81,7 +81,7 @@ echo "Wheel: $WHEEL" # -- Install ------------------------------------------------------------------ cd "$CURRENT_DIR" # Pre-install numpy so pip does not build it from source as a dependency -python3.14 -m pip install numpy +python3.14 -m pip install numpy==2.5.0 # Force-reinstall to ensure any previously installed matplotlib is replaced python3.14 -m pip install --force-reinstall "$WHEEL"