[Build] Fixes for CMake install (#18570)

This commit is contained in:
Luka Govedič
2025-05-27 20:49:24 -04:00
committed by GitHub
parent 51e98e4ffd
commit a3896c7f02
4 changed files with 25 additions and 7 deletions
+1 -4
View File
@@ -251,11 +251,8 @@ class cmake_build_ext(build_ext):
# CMake appends the extension prefix to the install path,
# and outdir already contains that prefix, so we need to remove it.
# We assume only the final component of extension prefix is added by
# CMake, this is currently true for current extensions but may not
# always be the case.
prefix = outdir
if '.' in ext.name:
for _ in range(ext.name.count('.')):
prefix = prefix.parent
# prefix here should actually be the same for all components