Skip to content

Commit 1de037a

Browse files
committed
More specific version cp
1 parent 75c7ed2 commit 1de037a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

build.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,13 +2012,19 @@ def backend_build(
20122012

20132013
cmake_script.mkdir(os.path.join(install_dir, "backends"))
20142014
cmake_script.rmdir(os.path.join(install_dir, "backends", be))
2015-
2015+
20162016
# The python library version available for install via 'yum install python3.X-devel' does not
20172017
# match the version of python inside the RHEL base container. This means that python packages
20182018
# installed within the container will not be picked up by the python backend stub process pybind
20192019
# bindings. It must instead must be installed via pyenv. We package it here for better usability.
20202020
if target_platform() == "rhel" and be == "python":
2021-
cmake_script.cp("/usr/lib64/libpython3*", os.path.join(repo_install_dir, "backends", be))
2021+
major_minor_version = ".".join(
2022+
(TRITON_VERSION_MAP[FLAGS.version][7]).split(".")[:2]
2023+
)
2024+
version_matched_files = "/usr/lib64/libpython" + major_minor_version + "*"
2025+
cmake_script.cp(
2026+
version_matched_files, os.path.join(repo_install_dir, "backends", be)
2027+
)
20222028

20232029
cmake_script.cpdir(
20242030
os.path.join(repo_install_dir, "backends", be),

0 commit comments

Comments
 (0)