[Bf-blender-cvs] [060da0858b8] master: CMake: omit WITH_INSTALL_PORTABLE from bpy_module.cmake

Campbell Barton noreply at git.blender.org
Tue Sep 13 05:30:26 CEST 2022


Commit: 060da0858b82aa957373bba51d52cf0bcb694b27
Author: Campbell Barton
Date:   Tue Sep 13 13:24:52 2022 +1000
Branches: master
https://developer.blender.org/rB060da0858b82aa957373bba51d52cf0bcb694b27

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.

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

M	build_files/cmake/config/bpy_module.cmake

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

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)



More information about the Bf-blender-cvs mailing list