sbinet / go-python

naive go bindings to the CPython2 C-API
Other
1.53k stars 138 forks source link

[osx] adding preprocessor directives to fix include on OSX. #48

Open truthbk opened 7 years ago

truthbk commented 7 years ago

I was having issues building on OSX.

Python is provided as a framework by Xcode, and has to be included as #include "Python/Python.h" as opposed to the expected in #include "Python.h" in other environments (ie. Linux). I think this is probably better than messing with the include paths.

The provided fix did it for me.

Thanks!

sbinet commented 7 years ago

perhaps this could be better handled w/ pkg-config, like in https://github.com/sbinet/go-python/issues/28#issuecomment-271474499 ? could you give it a spin?