We made this change for Chrome, and this works on 10.6 through 10.9, no version check required. Chrome only uses Clang, so while I think this will work in GCC I don't know for sure. 


On Jan 14, 2014, at 11:56, "William Fulton" <wsfulton@users.sf.net> wrote:

Can you modify that macro to detect the correct version of OSX, otherwise this will break versions prior to 10.9. Does it work with both of the apple compilers (gcc and clang) ?

[bugs:#1346] Must include different Python header on Mac as of 10.9

Status: open
Created: Wed Oct 23, 2013 07:05 PM UTC by Avi Drissman
Last Updated: Wed Oct 23, 2013 07:11 PM UTC
Owner: nobody

As of Mac OS X 10.9, #include doesn't work; you need #include Python.h>.

There are nasty hacks out there (see https://github.com/pmccormick/scout/blob/master/lldb/scripts/Python/edit-swig-python-wrapper-file.py ), but the simplest is to just change pyruntime.swg.


%insert(runtime) %{
/ Python.h has to appear first /




%insert(runtime) %{
/ Python.h has to appear first /

if defined(APPLE)

include Python.h>





Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/swig/bugs/1346/

To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/