From 2c23b4e0bff0ddd7219f4d23bcbe95d2da921fed Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 9 Sep 2022 03:12:56 +0200 Subject: Python: on macOS, stop requiring framework for building bpy module Build against Python from precompiled libraries by default, instead of requiring framework from python.org package install. The resulting bpy module can still be used with any Python install of the same version. Use the same CMake find module as Linux. This simplifies code, and makes it possible to manually set PYTHON_* variables in CMake configuration. Remove WITH_PYTHON_FRAMEWORK option for regular Blender build, as this doesn't work well due to missing required Python packages. Advanced users can still set PYTHON_ROOT_DIR=/Library/Frameworks/Python.framework/Versions/3.10 for the same result. --- source/creator/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/creator/CMakeLists.txt') diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index f8cbb9bc07c..b228c8d9ac1 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -362,9 +362,9 @@ elseif(APPLE) else() # Paths defined in terms of site-packages since the site-packages # directory can be a symlink (brew for example). - set(TARGETDIR_BPY ${PYTHON_LIBPATH}/site-packages/bpy) - set(TARGETDIR_VER ${PYTHON_LIBPATH}/site-packages/bpy/${BLENDER_VERSION}) - set(TARGETDIR_LIB ${PYTHON_LIBPATH}/site-packages/bpy/lib) + set(TARGETDIR_BPY ${PYTHON_SITE_PACKAGES}/bpy) + set(TARGETDIR_VER ${PYTHON_SITE_PACKAGES}/bpy/${BLENDER_VERSION}) + set(TARGETDIR_LIB ${PYTHON_SITE_PACKAGES}/bpy/lib) endif() else() set(TARGETDIR_VER Blender.app/Contents/Resources/${BLENDER_VERSION}) -- cgit v1.2.3