Actually fix it

This commit is contained in:
Cem Gökmen 2024-10-02 13:15:40 -07:00
parent 67f53f1a5a
commit 5211bd1220
1 changed files with 4 additions and 0 deletions

View File

@ -82,9 +82,13 @@ def _rename_if_necessary(filename: Path):
This is permissible because the manylinux wheels are compatible with older GLIBC versions even though
the filename suggests not - so we apply this hacky workaround. This allows pip to try to install them.
"""
# Rename the file if the system's GLIBC version is older than the one used in the NVIDIA PyPI packages
if platform.system() == "Linux" and _is_glibc_older():
new_filename = filename.with_name(filename.name.replace("manylinux_2_34", "manylinux_2_31"))
shutil.move(filename, new_filename)
return new_filename
# If the file is not renamed, return the original filename
return filename