@@ -101,7 +101,7 @@ def run_rebuild():
101
101
new_hash = get_lib_hash ()
102
102
103
103
# Try to avoid building if nothing has changed.
104
- if old_hash == new_hash :
104
+ if old_hash == new_hash and False :
105
105
print ("No native library changes detected. Not rebuilding interpreter." )
106
106
return
107
107
@@ -155,7 +155,8 @@ def run_rebuild():
155
155
for file in find_files (
156
156
path , "*.lib" if platform .system () == "Windows" else "*.a"
157
157
):
158
- if file in checkedLibs :
158
+ normalized_file = os .path .normpath (file )
159
+ if normalized_file in checkedLibs :
159
160
continue
160
161
161
162
filename_base = os .path .basename (file )
@@ -164,7 +165,7 @@ def run_rebuild():
164
165
if python_lib is not None and filename_base .endswith (sysconfig .get_config_var ("LIBRARY" )):
165
166
continue
166
167
167
- checkedLibs .add (filename_base )
168
+ checkedLibs .add (normalized_file )
168
169
169
170
initFunctions = getPythonInitFunctions (compiler , file )
170
171
print (file , initFunctions )
@@ -177,6 +178,8 @@ def run_rebuild():
177
178
dirpath , filename = os .path .split (relativePath )
178
179
if platform .system () != "Windows" and filename .startswith ("lib" ):
179
180
filename = filename [3 :]
181
+ if filename .endswith (".a.a" ):
182
+ filename = filename [:- 2 ]
180
183
if ext_suffix and filename .endswith (ext_suffix ):
181
184
filename = filename [: len (ext_suffix ) * - 1 ]
182
185
if filename .endswith (".a" ):
0 commit comments