Skip to content

Commit 894c978

Browse files
committed
Skip applink.c replacement on 3.12+
1 parent d486211 commit 894c978

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

cpython-windows/build.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -564,14 +564,18 @@ def hack_project_files(
564564
except NoSearchStringError:
565565
pass
566566

567-
# Our custom OpenSSL build has applink.c in a different location
568-
# from the binary OpenSSL distribution. Update it.
569-
ssl_proj = pcbuild_path / "_ssl.vcxproj"
570-
static_replace_in_file(
571-
ssl_proj,
572-
rb'<ClCompile Include="$(opensslIncludeDir)\applink.c">',
573-
rb'<ClCompile Include="$(opensslIncludeDir)\openssl\applink.c">',
574-
)
567+
# Our custom OpenSSL build has applink.c in a different location from the
568+
# binary OpenSSL distribution. This is no longer relevant for 3.12+ per
569+
# https://github.com/python/cpython/pull/131839, so we allow it to fail.swe
570+
try:
571+
ssl_proj = pcbuild_path / "_ssl.vcxproj"
572+
static_replace_in_file(
573+
ssl_proj,
574+
rb'<ClCompile Include="$(opensslIncludeDir)\applink.c">',
575+
rb'<ClCompile Include="$(opensslIncludeDir)\openssl\applink.c">',
576+
)
577+
except NoSearchStringError:
578+
pass
575579

576580
# Python 3.12+ uses the the pre-built tk-windows-bin 8.6.12 which doesn't
577581
# have a standalone zlib DLL, so we remove references to it. For Python

0 commit comments

Comments
 (0)