
--- Markus_Sch�pflin <markus.schoepflin@comsoft.de> wrote:
Ralf W. Grosse-Kunstleve wrote:
Yes, that looks like a good idea to me. I'll include it in my patched version of wrap_python.hpp.
If you're done with the test runs, just go ahead and apply the patches yourself. That would be best, I think.
The two patches below are now in CVS. Thanks Markus for your help! I've tested with a fairly large variety of compilers, but not VC6, VC7.0 or any Codewarrior. We should keep an eye on the Metacomm logs. I hope this is the end of our struggle with the "Python.h first" requirement. Cheers, Ralf Index: prefix.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/python/detail/prefix.hpp,v retrieving revision 1.3 diff -u -r1.3 prefix.hpp --- prefix.hpp 26 Jul 2004 00:32:07 -0000 1.3 +++ prefix.hpp 1 Sep 2004 09:11:38 -0000 @@ -9,8 +9,11 @@ // headers (so it can get control over some awful macros). // Unfortunately, Boost.Python needs to #include <limits.h> first, at // least... but this gets us as close as possible. + +# include <pyconfig.h> # if defined(_SGI_COMPILER_VERSION) && _SGI_COMPILER_VERSION == 741 -# include <complex> +# undef _POSIX_C_SOURCE +# undef _XOPEN_SOURCE # endif # include <boost/python/detail/wrap_python.hpp> # include <boost/python/detail/config.hpp> Index: wrap_python.hpp =================================================================== RCS file: /cvsroot/boost/boost/boost/python/detail/wrap_python.hpp,v retrieving revision 1.18 diff -u -r1.18 wrap_python.hpp --- wrap_python.hpp 26 Jul 2004 00:32:07 -0000 1.18 +++ wrap_python.hpp 1 Sep 2004 09:11:38 -0000 @@ -40,6 +40,10 @@ // #include <patchlevel.h> +#if PY_MAJOR_VERSION<2 || PY_MAJOR_VERSION==2 && PY_MINOR_VERSION<2 +#error Python 2.2 or higher is required for this version of Boost.Python. +#endif + #ifdef _DEBUG # ifndef BOOST_DEBUG_PYTHON # undef _DEBUG // Don't let Python force the debug library just because we're debugging. @@ -96,19 +100,9 @@ # define _MSC_VER 900 # endif -# if PY_MAJOR_VERSION < 2 || PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 2 -# include <config.h> -# else -# include <pyconfig.h> -# endif # undef hypot // undo the evil #define left by Python. # elif defined(__BORLANDC__) -# if PY_MAJOR_VERSION < 2 || PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION < 2 -# include <config.h> -# else -# include <pyconfig.h> -# endif # undef HAVE_HYPOT # define HAVE_HYPOT 1 # endif _______________________________ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush