Skip to content

Commit d8f5d9a

Browse files
committed
Fix geninterop.py include paths
1 parent a424998 commit d8f5d9a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/geninterop/geninterop.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ def preprocess_python_headers():
174174
include_py = sysconfig.get_config_var("INCLUDEPY")
175175
include_dirs.append(include_py)
176176

177+
include_args = [c for p in include_dirs for c in ["-I", p]]
178+
177179
defines = [
178180
"-D", "__attribute__(x)=",
179181
"-D", "__inline__=inline",
@@ -198,7 +200,7 @@ def preprocess_python_headers():
198200
defines.extend(("-D", "PYTHON_WITH_WIDE_UNICODE"))
199201

200202
python_h = os.path.join(include_py, "Python.h")
201-
cmd = ["clang", "-pthread", "-I"] + include_dirs + defines + ["-E", python_h]
203+
cmd = ["clang", "-pthread"] + include_args + defines + ["-E", python_h]
202204

203205
# normalize as the parser doesn't like windows line endings.
204206
lines = []

0 commit comments

Comments
 (0)