Skip to content

Commit

Permalink
Clean up macos module names.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxwell175 committed Nov 29, 2024
1 parent 438a35b commit 603de11
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Lib/rebuildpython.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def run_rebuild():
new_hash = get_lib_hash()

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

Expand Down Expand Up @@ -155,7 +155,8 @@ def run_rebuild():
for file in find_files(
path, "*.lib" if platform.system() == "Windows" else "*.a"
):
if file in checkedLibs:
normalized_file = os.path.normpath(file)
if normalized_file in checkedLibs:
continue

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

checkedLibs.add(filename_base)
checkedLibs.add(normalized_file)

initFunctions = getPythonInitFunctions(compiler, file)
print(file, initFunctions)
Expand All @@ -177,6 +178,8 @@ def run_rebuild():
dirpath, filename = os.path.split(relativePath)
if platform.system() != "Windows" and filename.startswith("lib"):
filename = filename[3:]
if filename.endswith(".a.a"):
filename = filename[:-2]
if ext_suffix and filename.endswith(ext_suffix):
filename = filename[: len(ext_suffix) * -1]
if filename.endswith(".a"):
Expand Down

0 comments on commit 603de11

Please sign in to comment.