Skip to content
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
9 changes: 6 additions & 3 deletions u/utf8proc/build_info.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"maintainer": "kiranNukal",
"maintainer": "shivansh-ibm",
"package_name": "utf8proc",
"github_url": "https://github.com/JuliaStrings/utf8proc",
"version": "v2.6.1",
"version": "v2.11.3",
"wheel_build" : true,
"default_branch": "main",
"package_dir": "u/utf8proc",
Expand All @@ -11,6 +11,9 @@
"validate_build_script": true,
"use_non_root_user": false,
"*": {
"build_script": "utf8proc_ubi_9.3.sh"
"build_script": [
"utf8proc_ubi_9.3.sh",
"utf8proc_ubi_10.2.sh"
]
}
}
4 changes: 2 additions & 2 deletions u/utf8proc/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ where = ["local"]

#Package data to add bazel in wheel, this is needed as its not a .py file
[tool.setuptools.package-data]
utf8proc = ["lib/*", "include/*"]
utf8proc = ["lib/*", "lib64/*", "include/*"]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you please raise a separate PR to add the path first in pyproject.toml? Once that PR is merged, please trigger a GHA build here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah , that is how it should be done but for now , i have locally verified the updated pyproject.toml is working as expected .


[tool.distutils.bdist_wheel]
plat-name = "linux_ppc64le" # Explicitly set the platform tag
universal = false # Disable universal wheel (forces platform-specific build)
universal = false # Disable universal wheel (forces platform-specific build)
115 changes: 115 additions & 0 deletions u/utf8proc/utf8proc_ubi_10.2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
#!/bin/bash -e
# -----------------------------------------------------------------------------
#
# Package : utf8proc
# Version : 2.11.3
# Source repo : https://github.com/JuliaStrings/utf8proc.git
# Tested on : UBI:10.2
# Language : Python
# Ci-Check : True
# Script License: Apache License, Version 2 or later
# Maintainer : Shivansh Sharma <shivansh.s1@ibm.com>
#
# 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

# Variables
PACKAGE_NAME=utf8proc
PACKAGE_VERSION=${1:-v2.11.3}
PACKAGE_URL=https://github.com/JuliaStrings/utf8proc.git
PACKAGE_DIR=utf8proc
WORK_DIR=$(pwd)

# Install dependencies and tools
yum install -y wget git cmake python3.14-devel python3.14-pip
yum install gcc-toolset-15 gcc-toolset-15-gcc gcc-toolset-15-gcc-c++ -y

# ---------------------------------------------------------------------------
# Activate GCC Toolset 15 (SCL removed in UBI 10 — use PATH export)
# ---------------------------------------------------------------------------
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

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:-}"

export CC="/opt/rh/gcc-toolset-15/root/usr/bin/gcc"
export CXX="/opt/rh/gcc-toolset-15/root/usr/bin/g++"

# Download the source package
echo "Cloning and installing..."
git clone $PACKAGE_URL
cd $PACKAGE_NAME

# Initialize git submodules
git submodule update --init

# Checkout the specified version
git checkout $PACKAGE_VERSION

# Setup prefix for installation
mkdir prefix
export PREFIX=$(pwd)/prefix

# Create build directory
mkdir build
cd build

# Run cmake to configure the build
cmake -G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX="${PREFIX}" \
-DCMAKE_POSITION_INDEPENDENT_CODE=1 \
-DBUILD_SHARED_LIBS=1 \
..
# Build and install
cmake --build .
cmake --build . --target install
cd ..
python3.14 -m pip install setuptools wheel
wget https://raw.githubusercontent.com/ppc64le/build-scripts/refs/heads/master/u/utf8proc/pyproject.toml
sed -i s/{PACKAGE_VERSION}/$PACKAGE_VERSION/g pyproject.toml
mkdir -p local/$PACKAGE_NAME
# Copy the installation files to the local directory
cp -r prefix/* local/$PACKAGE_NAME/
echo "Building wheel..."
python3.14 -m pip wheel --wheel-dir ${WORK_DIR} -vv --no-build-isolation --no-deps .

# Install locally built wheel for validation

WHEEL=$(find "${WORK_DIR}" -name "${PACKAGE_NAME}-*.whl" | head -1)
echo "Built wheel: ${WHEEL}"

if ! python3.14 -m pip install "${WHEEL}" --no-deps; then
echo "------------------${PACKAGE}:Install_fails-------------------------------------"
echo "${PACKAGE} | ${PACKAGE_URL} | ${PACKAGE_VERSION} | GitHub | Fail | Install_Fails"
exit 1
fi
SITE_PACKAGES=$(python3.14 -m pip show utf8proc | awk -F': ' '/^Location:/ {print $2}')
Comment thread
rashmi-ibm marked this conversation as resolved.
test -f "${SITE_PACKAGES}/utf8proc/include/utf8proc.h" || {
echo "ERROR: utf8proc.h not found"
exit 1
}
test -f "${SITE_PACKAGES}/utf8proc/lib64/libutf8proc.so" || {
echo "ERROR: libutf8proc.so not found"
exit 1
}


echo "Build and installation completed successfully."
echo "There are no test cases available. Manually tested and skipping the test cases."
Loading