Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix geninterop.py include paths
  • Loading branch information
filmor committed May 10, 2020
commit 3915a942384f297195cfd3d581339ba6b4b66fd2
4 changes: 3 additions & 1 deletion tools/geninterop/geninterop.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ def preprocess_python_headers():
include_py = sysconfig.get_config_var("INCLUDEPY")
include_dirs.append(include_py)

include_args = [c for p in include_dirs for c in ["-I", p]]

defines = [
"-D", "__attribute__(x)=",
"-D", "__inline__=inline",
Expand All @@ -198,7 +200,7 @@ def preprocess_python_headers():
defines.extend(("-D", "PYTHON_WITH_WIDE_UNICODE"))

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

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