The following header does not work on all UNIX machines or machines running multiple versions of python: #include <Python.h>
Depending on what version of Python you use, the header needs to change to: #include <python(version).(release)/Python.h> For instance, if you have python 2.7, the include line should read: #include <python2.7/Python.h>
To the best of my knowledge, there are no Macros from the gcc that define the Python version the user is running. However, I know the following will be compatible with Mac computers:
#ifdef __APPLE__
#include <python2.6/Python.h>
#else
#include <Python.h>
#endif
I think there should be a short explanatory note in the README describing how to change the include line; if the user has multiple versions of Python, the code will not compile unless you specifically state what version of Python to use in the include line.
Nick