{"push_id":767321746,"size":3,"distinct_size":1,"ref":"refs/heads/master","head":"fb9d3739ecaafde546472bacc831732a68b3ab78","before":"30a35a7ea1caec8323d9c79ca0b59cd56d491c01","commits":[{"sha":"e5e3ddc09904ae5dd1e2257c073a2d3428633a27","author":{"email":"7b0496f66f66ee22a38826c310c38b415671b832@gmail.com","name":"Michka Popoff"},"message":"ENH: Do not link against specific Python library on OS X\n\nThe goal of this change is to allow the importing interpreter\nto provide cpython's symbols; that interpreter may be different\nfrom the one which was used to build ITK.\n\nThis is necessary to allow a module to be built with a Python installed\nto a particular prefix (i.e. system Python) and imported from\na binary-compatible Python in a different prefix\n(i.e. Homebrew or Python.org Python).\n\ntarget_link_libraries() was passing the PYTHON_LIBRARY down to the linker.\nFor example, when using the python version coming from homebrew:\n-I/usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/include/python2.7\n\nTrying to use itk from OS X's system Python would then result in the following error:\nFatal Python error: PyThreadState_Get: no current thread\nAbort trap: 6\n\nA solution is to not pass the PYTHON_LIBRARY, and use the -undefined dynamic_lookup flag.\n\nI tested this on OS X 10.10 with latest clang. ITK can the be imported from all Pythons with\nare ABI compatible (2.7.x in our case). Tested with OS X Python 2.7.6 and homebrew's Python 2.7.10.\n\nI only allowed this for Clang; not sure if gcc supports this.\nMaybe some older gcc 4.2 versions on OS X.\n\nOS X supports the flag since 10.3, see:\nhttps://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/MachOTopics/1-Articles/executing_files.html\n\nUsing otool on the .so modules (otool -L _ITKCommonPython.so) shows\nthat there is no more reference of the python library when using the\n -undefined dynamic_lookup flag.\n\nThis idea was originally proposed by Tim Smith, on the homebrew-science repo.\n\nChange-Id: I82ba98d3169a95b10a77a60ed22929eaac839e71","distinct":false,"url":"https://api.github.com/repos/Kitware/ITK/commits/e5e3ddc09904ae5dd1e2257c073a2d3428633a27"},{"sha":"d0e04c57a908dfc5eedd4d10eaf073bdbad0abca","author":{"email":"19992967210b3f47c4f47dcba4b6b720ac697396@kitware.com","name":"Matt McCormick"},"message":"Merge branch 'OSXPython' into release\n\nChange-Id: I7a645636af4317b1c66b6c0e8bb7383c1a86d555","distinct":false,"url":"https://api.github.com/repos/Kitware/ITK/commits/d0e04c57a908dfc5eedd4d10eaf073bdbad0abca"},{"sha":"fb9d3739ecaafde546472bacc831732a68b3ab78","author":{"email":"19992967210b3f47c4f47dcba4b6b720ac697396@kitware.com","name":"Matt McCormick"},"message":"Merge branch 'release'\n\nChange-Id: I94a5781589d4f3ec7b52d9e742e79e65d237e6d5","distinct":true,"url":"https://api.github.com/repos/Kitware/ITK/commits/fb9d3739ecaafde546472bacc831732a68b3ab78"}]}