Skip to content

Commit 99f259e

Browse files
committed
[python3] Backport python/cpython#19740
1 parent f3f2227 commit 99f259e

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
2+
index f4f57c5d270028..9e70303868e5de 100644
3+
--- a/PC/pyconfig.h
4+
+++ b/PC/pyconfig.h
5+
@@ -302,7 +302,7 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
6+
#ifdef MS_COREDLL
7+
# if !defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_BUILTIN)
8+
/* not building the core - must be an ext */
9+
-# if defined(_MSC_VER)
10+
+# if defined(_MSC_VER) && !defined(Py_NO_LINK_LIB)
11+
/* So MSVC users need not specify the .lib
12+
file in their Makefile (other compilers are
13+
generally taken care of by distutils.) */

ports/python3/portfile.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ set(PATCHES
4444
0016-undup-ffi-symbols.patch # Required for lld-link.
4545
0018-fix-sysconfig-include.patch
4646
0019-fix-ssl-linkage.patch
47+
0020-Py_NO_LINK_LIB.patch
4748
)
4849

4950
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")

ports/python3/vcpkg-cmake-wrapper.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,13 @@ else()
126126
endif()
127127

128128
if(TARGET @PythonFinder_PREFIX@::Python)
129-
target_compile_definitions(@PythonFinder_PREFIX@::Python INTERFACE "$<$<CONFIG:Debug>:Py_DEBUG>")
129+
target_compile_definitions(@PythonFinder_PREFIX@::Python INTERFACE "Py_NO_LINK_LIB")
130130
endif()
131131
if(TARGET @PythonFinder_PREFIX@::Module)
132-
target_compile_definitions(@PythonFinder_PREFIX@::Module INTERFACE "$<$<CONFIG:Debug>:Py_DEBUG>")
132+
target_compile_definitions(@PythonFinder_PREFIX@::Module INTERFACE "Py_NO_LINK_LIB")
133+
endif()
134+
if(TARGET @PythonFinder_PREFIX@::SABIModule)
135+
target_compile_definitions(@PythonFinder_PREFIX@::SABIModule INTERFACE "Py_NO_LINK_LIB")
133136
endif()
134137

135138
unset(_PythonFinder_WantInterp)

versions/p-/python3.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"versions": [
33
{
4-
"git-tree": "e50bd403f5a20b5932cda6a1801460da09a90808",
4+
"git-tree": "868cb9f717c90f69768eaeca4a6c38cdbf865e30",
55
"version": "3.12.9",
66
"port-version": 0
77
},

0 commit comments

Comments
 (0)