Skip to content

Commit 93e93d6

Browse files
committed
Skip applink.c replacement on 3.12+
1 parent d486211 commit 93e93d6

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

cpython-windows/build.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -564,14 +564,16 @@ 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. Update it.
569+
# In https://github.com/python/cpython/pull/131839, this was removed from 3.12+
570+
if meets_python_maximum_version(python_version, "3.11"):
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+
)
575577

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

0 commit comments

Comments
 (0)