@@ -156,8 +156,10 @@ def build_extensions(self): # noqa
156156 # self._add_directory(include_dirs, path.join(include_path_prefix, "include"))
157157 self ._add_directory (library_dirs , library_dir )
158158 lib_export_file = Path (os .path .join (library_dir , "libheif.dll.a" ))
159- if lib_export_file .is_file ():
160- copy (lib_export_file , os .path .join (library_dir , "libheif.lib" ))
159+ lib_lib_file = Path (os .path .join (library_dir , "libheif.lib" ))
160+ if lib_export_file .is_file () and not lib_lib_file .is_file ():
161+ print (f"Copying { lib_export_file } to { lib_lib_file } " )
162+ copy (lib_export_file , lib_lib_file )
161163 else :
162164 warn ("If you build this with MSYS2, you should not see this warning." , stacklevel = 1 )
163165
@@ -226,16 +228,16 @@ def _update_extension(self, name, libraries, extra_compile_args=None, extra_link
226228
227229 def _find_include_dir (self , dirname , include ):
228230 for directory in self .compiler .include_dirs :
229- print ("Checking for include file %s in %s" , ( include , directory ) )
231+ print (f "Checking for include file ' { include } ' in ' { directory } '" )
230232 result_path = os .path .join (directory , include )
231233 if os .path .isfile (result_path ):
232- print ("Found %s in %s" , ( include , directory ) )
234+ print (f "Found ' { include } ' in ' { directory } '" )
233235 return result_path
234236 subdir = os .path .join (directory , dirname )
235- print ("Checking for include file %s in %s" , ( include , subdir ) )
237+ print (f "Checking for include file ' { include } ' in ' { subdir } '" )
236238 result_path = os .path .join (subdir , include )
237239 if os .path .isfile (result_path ):
238- print ("Found %s in %s" , ( include , subdir ) )
240+ print (f "Found ' { include } ' in ' { subdir } '" )
239241 return result_path
240242 return ""
241243
0 commit comments