
Ralf W. Grosse-Kunstleve wrote:
I just started a local test run after inserting #include <pyconfig.h> at the beginning of prefix.hpp. It will take a few hours before I have all results.
Do you suggest that adding <pyconfig.h> to prefix.hpp instead of wrap_python.hpp would be the way to go?
+// Include the python config file. This has to be done before including any +// system headers because it defines macros which might collide with default +// definitions. Namely these are _OSF_SOURCE, _POSIX_C_SOURCE, and +// _XOPEN_SOURCE. +// +#if PY_MAJOR_VERSION < 2 || PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 2 +# include <config.h> +#else +# include <pyconfig.h> +#endif
Boost.Python Version 2 requires Python 2.2 or greater anyway.
What about a check in this file, then? Something like #if PY_MAJOR_VERSION<2 || PY_MAJOR_VERSION==2 && PY_MINOR_VERSION<2 #error ... #endif
I think we should eliminate this complicated construct.
It was taken from further down the file. That should go as well, then. Markus