Python: install pyconfig.h on OSX, needed for PIP
authorCampbell Barton <ideasman42@gmail.com>
Thu, 28 Apr 2016 10:43:14 +0000 (20:43 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 28 Apr 2016 10:46:58 +0000 (20:46 +1000)
source/creator/CMakeLists.txt

index 273e5b33d0d79865a4d38b1262300939a829a70e..b7d8381639d701aec08f653a65ca86a1b9a2df6c 100644 (file)
@@ -996,6 +996,15 @@ elseif(APPLE)
                        DESTINATION ${TARGETDIR_VER}/python
                        USE_SOURCE_PERMISSIONS
                )
+
+               # Needed for distutils/pip
+               # get the last part of the include dir, will be 'python{version}{abiflag}',
+               get_filename_component(_py_inc_suffix ${PYTHON_INCLUDE_DIR} NAME)
+               install(
+                       FILES ${PYTHON_INCLUDE_DIR}/pyconfig.h
+                       DESTINATION ${TARGETDIR_VER}/python/include/${_py_inc_suffix}
+               )
+               unset(_py_inc_suffix)
        endif()
        
        # install blenderplayer bundle - copy of blender.app above. re-using macros et al