mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-111650: Ensure pyconfig.h includes Py_GIL_DISABLED on Windows (GH-112778)
This commit is contained in:
parent
498a096a51
commit
79dad03747
25 changed files with 112 additions and 44 deletions
|
|
@ -73,7 +73,10 @@ def copy_if_modified(src, dest):
|
|||
)
|
||||
|
||||
if do_copy:
|
||||
shutil.copy2(src, dest)
|
||||
try:
|
||||
shutil.copy2(src, dest)
|
||||
except FileNotFoundError:
|
||||
raise FileNotFoundError(src) from None
|
||||
|
||||
|
||||
def get_lib_layout(ns):
|
||||
|
|
@ -208,8 +211,7 @@ def _c(d):
|
|||
|
||||
for dest, src in rglob(ns.source / "Include", "**/*.h"):
|
||||
yield "include/{}".format(dest), src
|
||||
src = ns.source / "PC" / "pyconfig.h"
|
||||
yield "include/pyconfig.h", src
|
||||
yield "include/pyconfig.h", ns.build / "pyconfig.h"
|
||||
|
||||
for dest, src in get_tcltk_lib(ns):
|
||||
yield dest, src
|
||||
|
|
|
|||
|
|
@ -739,4 +739,7 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
|
|||
/* Define if libssl has X509_VERIFY_PARAM_set1_host and related function */
|
||||
#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1
|
||||
|
||||
/* Define if you want to disable the GIL */
|
||||
#undef Py_GIL_DISABLED
|
||||
|
||||
#endif /* !Py_CONFIG_H */
|
||||
|
|
@ -35,6 +35,8 @@
|
|||
winsound.PlaySound(None, 0)
|
||||
*/
|
||||
|
||||
#include "pyconfig.h" // Py_GIL_DISABLED
|
||||
|
||||
#ifndef Py_GIL_DISABLED
|
||||
// Need limited C API version 3.12 for Py_MOD_PER_INTERPRETER_GIL_SUPPORTED
|
||||
#define Py_LIMITED_API 0x030c0000
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue