Skip to content

Commit 603de11

Browse files
committed
Clean up macos module names.
1 parent 438a35b commit 603de11

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Lib/rebuildpython.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def run_rebuild():
101101
new_hash = get_lib_hash()
102102

103103
# Try to avoid building if nothing has changed.
104-
if old_hash == new_hash:
104+
if old_hash == new_hash and False:
105105
print("No native library changes detected. Not rebuilding interpreter.")
106106
return
107107

@@ -155,7 +155,8 @@ def run_rebuild():
155155
for file in find_files(
156156
path, "*.lib" if platform.system() == "Windows" else "*.a"
157157
):
158-
if file in checkedLibs:
158+
normalized_file = os.path.normpath(file)
159+
if normalized_file in checkedLibs:
159160
continue
160161

161162
filename_base = os.path.basename(file)
@@ -164,7 +165,7 @@ def run_rebuild():
164165
if python_lib is not None and filename_base.endswith(sysconfig.get_config_var("LIBRARY")):
165166
continue
166167

167-
checkedLibs.add(filename_base)
168+
checkedLibs.add(normalized_file)
168169

169170
initFunctions = getPythonInitFunctions(compiler, file)
170171
print(file, initFunctions)
@@ -177,6 +178,8 @@ def run_rebuild():
177178
dirpath, filename = os.path.split(relativePath)
178179
if platform.system() != "Windows" and filename.startswith("lib"):
179180
filename = filename[3:]
181+
if filename.endswith(".a.a"):
182+
filename = filename[:-2]
180183
if ext_suffix and filename.endswith(ext_suffix):
181184
filename = filename[: len(ext_suffix) * -1]
182185
if filename.endswith(".a"):

0 commit comments

Comments
 (0)