From 54000181067f7d2efab6b7644ec27b92d5d9bf37 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 27 Jan 2022 15:03:11 +0100 Subject: Build: enable Python 3.10 on macOS --- build_files/cmake/platform/platform_apple.cmake | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake index 8acea1be841..379370a989a 100644 --- a/build_files/cmake/platform/platform_apple.cmake +++ b/build_files/cmake/platform/platform_apple.cmake @@ -128,25 +128,20 @@ if(WITH_CODEC_SNDFILE) endif() if(WITH_PYTHON) - # we use precompiled libraries for py 3.9 and up by default - set(PYTHON_VERSION 3.9) + # Use precompiled libraries by default. + set(PYTHON_VERSION 3.10) if(NOT WITH_PYTHON_MODULE AND NOT WITH_PYTHON_FRAMEWORK) - # normally cached but not since we include them with blender + # Normally cached but not since we include them with blender. set(PYTHON_INCLUDE_DIR "${LIBDIR}/python/include/python${PYTHON_VERSION}") set(PYTHON_EXECUTABLE "${LIBDIR}/python/bin/python${PYTHON_VERSION}") set(PYTHON_LIBRARY ${LIBDIR}/python/lib/libpython${PYTHON_VERSION}.a) 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 + # Module must be compiled against Python framework. set(_py_framework "/Library/Frameworks/Python.framework/Versions/${PYTHON_VERSION}") - set(PYTHON_INCLUDE_DIR "${_py_framework}/include/python${PYTHON_VERSION}") set(PYTHON_EXECUTABLE "${_py_framework}/bin/python${PYTHON_VERSION}") set(PYTHON_LIBPATH "${_py_framework}/lib/python${PYTHON_VERSION}") - # set(PYTHON_LIBRARY python${PYTHON_VERSION}) - # set(PYTHON_LINKFLAGS "-u _PyMac_Error -framework Python") # won't build with this enabled - unset(_py_framework) endif() -- cgit v1.2.3