gh-94205: Ensures all required DLLs are copied on Windows for underpth tests (GH-94206)

This commit is contained in:
Steve Dower 2022-06-24 11:48:53 +01:00 committed by GitHub
parent 8625802d85
commit 51fd4de101
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -570,6 +570,8 @@ def _create_underpth_exe(self, lines, exe_pth=True):
dll_file = os.path.join(temp_dir, os.path.split(dll_src_file)[1])
shutil.copy(sys.executable, exe_file)
shutil.copy(dll_src_file, dll_file)
for fn in glob.glob(os.path.join(os.path.split(dll_src_file)[0], "vcruntime*.dll")):
shutil.copy(fn, os.path.join(temp_dir, os.path.split(fn)[1]))
if exe_pth:
_pth_file = os.path.splitext(exe_file)[0] + '._pth'
else: