From 060da0858b82aa957373bba51d52cf0bcb694b27 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 13 Sep 2022 13:24:52 +1000 Subject: CMake: omit WITH_INSTALL_PORTABLE from bpy_module.cmake Since this was added, Linux libraries have been included in `../lib/`. This made `make bpy` on Linux install the `bpy` module into the bundled SVN libraries which isn't very useful. Now leave WITH_INSTALL_PORTABLE unset (defaulting to ON). Python developers may reference their systems Python and disable the option if they wish for a system-wide module installation. --- build_files/cmake/config/bpy_module.cmake | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/build_files/cmake/config/bpy_module.cmake b/build_files/cmake/config/bpy_module.cmake index c8b13cbd533..7bd5c3fc1a1 100644 --- a/build_files/cmake/config/bpy_module.cmake +++ b/build_files/cmake/config/bpy_module.cmake @@ -11,9 +11,18 @@ set(WITH_PYTHON_MODULE ON CACHE BOOL "" FORCE) # ----------------------------------------------------------------------------- # Installation Configuration. - -# install into the systems python dir -set(WITH_INSTALL_PORTABLE OFF CACHE BOOL "" FORCE) +# +# NOTE: `WITH_INSTALL_PORTABLE` always defaults to ON when building as a Python module and +# isn't set here as it makes changing the setting impractical. +# Python-developers could prefer either ON/OFF depending on their usage: +# +# - When using the system's Python, disabling will install into their `site-packages`, +# allowing them to run Python from any directory and `import bpy`. +# - When using Blender's bundled Python in `./../lib/` it will install there +# which isn't especially useful as it requires running Python from this directory too. +# +# So default `WITH_INSTALL_PORTABLE` to ON, and developers who don't use Python from `./../lib/` +# can disable it if they wish to install into their systems Python. # There is no point in copying python into Python. set(WITH_PYTHON_INSTALL OFF CACHE BOOL "" FORCE) -- cgit v1.2.3