summaryrefslogtreecommitdiffstats
path: root/Tools/peg_generator/pegen/build.py
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2023-12-13 15:38:45 (GMT)
committerGitHub <noreply@github.com>2023-12-13 15:38:45 (GMT)
commit79dad03747fe17634136209f1bcaf346a8c10617 (patch)
tree0ca624c64faee7dba75917b1483ab9318c2676f5 /Tools/peg_generator/pegen/build.py
parent498a096a51a215cd3084845131e619222b906b3e (diff)
downloadcpython-79dad03747fe17634136209f1bcaf346a8c10617.zip
cpython-79dad03747fe17634136209f1bcaf346a8c10617.tar.gz
cpython-79dad03747fe17634136209f1bcaf346a8c10617.tar.bz2
gh-111650: Ensure pyconfig.h includes Py_GIL_DISABLED on Windows (GH-112778)
Diffstat (limited to 'Tools/peg_generator/pegen/build.py')
-rw-r--r--Tools/peg_generator/pegen/build.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tools/peg_generator/pegen/build.py b/Tools/peg_generator/pegen/build.py
index 30bfb31..7df39a3 100644
--- a/Tools/peg_generator/pegen/build.py
+++ b/Tools/peg_generator/pegen/build.py
@@ -143,6 +143,10 @@ def compile_c_extension(
str(MOD_DIR.parent.parent.parent / "Parser" / "lexer"),
str(MOD_DIR.parent.parent.parent / "Parser" / "tokenizer"),
]
+ if sys.platform == "win32":
+ # HACK: The location of pyconfig.h has moved within our build, and
+ # setuptools hasn't updated for it yet. So add the path manually for now
+ include_dirs.append(pathlib.Path(sysconfig.get_config_h_filename()).parent)
extension = Extension(
extension_name,
sources=[generated_source_path],