Tested and fails.
The file contains `{"include": ["@[\"<]patchlevel\\.h[\">]", "private", "<Python.h>", "public"]},`
But I get:
```
/home/alex/git/scorep_binding_python/src/scorepy/events.cpp should add these lines:
#include <patchlevel.h> // for PY_MAJOR_VERSION
/home/alex/git/scorep_binding_python/src/scorepy/events.cpp should remove these lines:
- #include <Python.h> // lines 2-2
```
Run with `iwyu_tool -p build src/scorepy/events.cpp -- --mapping_file=python3.7.imp` on https://github.com/score-p/scorep_binding_python after configuring with CMake (I hate setting up paths ;) )
If this is a reasonably recent `iwyu_tool.py`, you need to add `-Xiwyu`-prefix for suffix arguments:
iwyu_tool -p build src/scorepy/events.cpp -- -Xiwyu --mapping_file=python3.7.imp
This was added to allow adding extra Clang arguments too.
Ouch yes, it even says so: `error: unsupported option '--mapping_file=python3.7.imp'`
I'm surprised it doesn't just error out. Also the mapping_file param must be an absolute path: `iwyu_tool -p build src/scorepy/events.cpp -- -Xiwyu --mapping_file=$PWD/python3.7.imp` worked, so yes this works.
Hence I'd suggest to include a few of those generated ones with IWYU by default. I guess they won't vary to much by version if at all, so maybe 1 is enough.
For reference mine is attached:
[python3.7.imp.txt](https://github.com/include-what-you-use/include-what-you-use/files/5921443/python3.7.imp.txt)
Thank you! Yeah, let's throw a python3 version in there, py2 is dead (as if :)).
I'll clean things up and push an updated branch.