Skip to content

Added build script for tbb==2023.1.0 for UBI:10.2 - #8690

Open
SakshiJain0302 wants to merge 1 commit into
ppc64le:masterfrom
SakshiJain0302:tbb
Open

Added build script for tbb==2023.1.0 for UBI:10.2#8690
SakshiJain0302 wants to merge 1 commit into
ppc64le:masterfrom
SakshiJain0302:tbb

Conversation

@SakshiJain0302

Copy link
Copy Markdown
Contributor

Checklist

  • Have you checked and followed all the points mention in the CONTRIBUTING.MD
  • Have you validated script on UBI 9 container
  • Did you run the script(s) on fresh container with set -e option enabled and observe success ?
  • Did you have Legal approvals for patch files ?

Comment on lines +116 to +146
# Patch python/setup.py — add lib64 to library_dirs and fix version string
# ---------------------------------------------------------------------------
echo "------------Applying Patch------------"
python3.14 - <<'PYEOF'
from pathlib import Path

p = Path("python/setup.py")
src = p.read_text()

# 1. Add lib64 to library_dirs (after the vc_mt line)
OLD = "os.path.join(tbb_root, 'lib', 'intel64', 'vc_mt'), # for Windows\n ] if not use_compiler_tbb else [],"
NEW = "os.path.join(tbb_root, 'lib', 'intel64', 'vc_mt'), # for Windows\n os.path.join(tbb_root, 'lib64'),\n ] if not use_compiler_tbb else [],"
if OLD in src:
src = src.replace(OLD, NEW, 1)
print(" patched: library_dirs += lib64")
elif "lib64" in src:
print(" already patched: lib64 present")
else:
raise RuntimeError("Could not find library_dirs block to patch")

# 2. Fix version string
if ' version ="0.2",' in src:
src = src.replace(' version ="0.2",', ' version ="2023.1.0",', 1)
print(" patched: version -> 2023.1.0")
elif '2023.1.0' in src:
print(" already patched: version is 2023.1.0")

p.write_text(src)
print("Patch applied successfully.")
PYEOF
echo "------------Applied patch successfully---------------------"

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.

Please create a separate patch file and apply the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants