Fix missing rename behavior in old glibc versions

This commit is contained in:
Cem Gökmen 2024-10-02 13:14:19 -07:00
parent 032c9b28ab
commit 67f53f1a5a
1 changed files with 2 additions and 1 deletions

View File

@ -83,7 +83,8 @@ def _rename_if_necessary(filename: Path):
the filename suggests not - so we apply this hacky workaround. This allows pip to try to install them.
"""
if platform.system() == "Linux" and _is_glibc_older():
return filename.with_name(filename.name.replace("manylinux_2_34", "manylinux_2_31"))
new_filename = filename.with_name(filename.name.replace("manylinux_2_34", "manylinux_2_31"))
shutil.move(filename, new_filename)
return filename