Skip to content

Commit c74133b

Browse files
committed
Add extra include dir for PEG tests
1 parent 6c067b7 commit c74133b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Tools/peg_generator/pegen/build.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,10 @@ def compile_c_extension(
143143
str(MOD_DIR.parent.parent.parent / "Parser" / "lexer"),
144144
str(MOD_DIR.parent.parent.parent / "Parser" / "tokenizer"),
145145
]
146+
if sys.platform == "win32":
147+
# HACK: The location of pyconfig.h has moved within our build, and
148+
# setuptools hasn't updated for it yet. So add the path manually for now
149+
include_dirs.append(pathlib.Path(sysconfig.get_config_h_filename()).parent)
146150
extension = Extension(
147151
extension_name,
148152
sources=[generated_source_path],

0 commit comments

Comments
 (0)