diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index 41da45e45..abd56be0c 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -205,7 +205,7 @@ deps = { # retarget to default toolset (selected by vcvarsall.bat) "v141": "$(DefaultPlatformToolset)", # noqa: E501 # retarget to latest (selected by vcvarsall.bat) - "8.1": "$(WindowsSDKVersion)", # noqa: E501 + "10.0.17134.0": "$(WindowsSDKVersion)", # noqa: E501 } }, "build": [ @@ -420,7 +420,10 @@ def build_dep(name): with open(patch_file, "r") as f: text = f.read() for patch_from, patch_to in patch_list.items(): - text = text.replace(patch_from.format(**prefs), patch_to.format(**prefs)) + patch_from = patch_from.format(**prefs) + patch_to = patch_to.format(**prefs) + assert patch_from in text + text = text.replace(patch_from, patch_to) with open(patch_file, "w") as f: f.write(text)