[Bf-blender-cvs] [119ce13] master: Fix T46623: OSX bpy.app.binary_path_python incorrect

Campbell Barton noreply at git.blender.org
Wed Mar 30 13:50:22 CEST 2016


Commit: 119ce13a41d5c97debc431662e954c90e4bb3a59
Author: Campbell Barton
Date:   Wed Mar 30 22:44:44 2016 +1100
Branches: master
https://developer.blender.org/rB119ce13a41d5c97debc431662e954c90e4bb3a59

Fix T46623: OSX bpy.app.binary_path_python incorrect

CMake's PYTHON_EXECUTABLE wasn't set.

===================================================================

M	CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 12f5870..b9b5cb0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2004,14 +2004,14 @@ elseif(APPLE)
 		if(NOT WITH_PYTHON_MODULE AND NOT WITH_PYTHON_FRAMEWORK)
 			# normally cached but not since we include them with blender
 			set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}m")
-			# set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}") # not used yet
+			set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}m")
 			set(PYTHON_LIBRARY python${PYTHON_VERSION}m)
 			set(PYTHON_LIBPATH "${LIBDIR}/python/lib/python${PYTHON_VERSION}")
 			# set(PYTHON_LINKFLAGS "-u _PyMac_Error")  # won't  build with this enabled
 		else()
 			# module must be compiled against Python framework
 			set(PYTHON_INCLUDE_DIR "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/include/python${PYTHON_VERSION}m")
-			set(PYTHON_EXECUTABLE "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/bin/python${PYTHON_VERSION}")
+			set(PYTHON_EXECUTABLE "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/bin/python${PYTHON_VERSION}m")
 			#set(PYTHON_LIBRARY python${PYTHON_VERSION})
 			set(PYTHON_LIBPATH "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}/lib/python${PYTHON_VERSION}/config-${PYTHON_VERSION}m")
 			#set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework Python")  # won't  build with this enabled
@@ -2020,6 +2020,10 @@ elseif(APPLE)
 		# uncached vars
 		set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
 		set(PYTHON_LIBRARIES  "${PYTHON_LIBRARY}")
+
+		if(NOT EXISTS "${PYTHON_EXECUTABLE}")
+			message(FATAL_ERROR "Python executable missing: ${PYTHON_EXECUTABLE}")
+		endif()
 	endif()
 
 	if(WITH_FFTW3)




More information about the Bf-blender-cvs mailing list