[Bf-blender-cvs] [91892608803] master: Python: update defaults for "make bpy"

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


Commit: 918926088031cff58a9543ea5edd17dc7d9cd428
Author: Campbell Barton
Date:   Tue Sep 13 13:24:47 2022 +1000
Branches: master
https://developer.blender.org/rB918926088031cff58a9543ea5edd17dc7d9cd428

Python: update defaults for "make bpy"

This was a kind of "lite" target, disabling options such as FFMPEG and
ALEMBIC which may be useful to read/write data from the Python module.

Now fewer options have been changed.
The following options are now disabled:

- Audio support (to prevent audio devices being initialized on startup).
- Input device support such as NDOF and IME as there is no GUI.
- Blender thumbnail extraction as it's not installed as part of
  the Python module.

Instead of attempting to predict what is useful to enable when building
as a Python module, developers can mix combine options e.g.
"make bpy release" or "make bpy lite".

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

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 c4be5c2e61f..c8b13cbd533 100644
--- a/build_files/cmake/config/bpy_module.cmake
+++ b/build_files/cmake/config/bpy_module.cmake
@@ -8,41 +8,72 @@
 
 set(WITH_PYTHON_MODULE       ON  CACHE BOOL "" FORCE)
 
+
+# -----------------------------------------------------------------------------
+# Installation Configuration.
+
 # install into the systems python dir
 set(WITH_INSTALL_PORTABLE    OFF CACHE BOOL "" FORCE)
 
-# no point int copying python into python
+# There is no point in copying python into Python.
 set(WITH_PYTHON_INSTALL      OFF CACHE BOOL "" FORCE)
 
-# disable audio, its possible some devs may want this but for now disable
-# so the python module doesn't hold the audio device and loads quickly.
+# Depends on Python install, do this to quiet warning.
+set(WITH_DRACO               OFF CACHE BOOL "" FORCE)
+
+if(WIN32)
+  set(WITH_WINDOWS_BUNDLE_CRT  OFF CACHE BOOL "" FORCE)
+endif()
+
+
+# -----------------------------------------------------------------------------
+# Library Compatibility.
+
+# JEMALLOC does not work with `dlopen()` of Python modules:
+# https://github.com/jemalloc/jemalloc/issues/1237
+set(WITH_MEM_JEMALLOC        OFF CACHE BOOL "" FORCE)
+
+
+# -----------------------------------------------------------------------------
+# Application Support.
+
+# Not useful to include with the Python module.
+# Although a way to extract this from Python could be handle,
+# this would be better exposed directly via the Python API.
+set(WITH_BLENDER_THUMBNAILER OFF CACHE BOOL "" FORCE)
+
+
+# -----------------------------------------------------------------------------
+# Audio Support.
+
+# Disable audio, its possible some developers may want this but for now disable
+# so the Python module doesn't hold the audio device and loads quickly.
 set(WITH_AUDASPACE           OFF CACHE BOOL "" FORCE)
-set(WITH_CODEC_FFMPEG        OFF CACHE BOOL "" FORCE)
-set(WITH_CODEC_SNDFILE       OFF CACHE BOOL "" FORCE)
-set(WITH_COREAUDIO           OFF CACHE BOOL "" FORCE)
 set(WITH_JACK                OFF CACHE BOOL "" FORCE)
 set(WITH_OPENAL              OFF CACHE BOOL "" FORCE)
-set(WITH_PULSEAUDIO          OFF CACHE BOOL "" FORCE)
 set(WITH_SDL                 OFF CACHE BOOL "" FORCE)
-set(WITH_WASAPI              OFF CACHE BOOL "" FORCE)
+if(UNIX AND NOT APPLE)
+  set(WITH_PULSEAUDIO          OFF CACHE BOOL "" FORCE)
+endif()
+if(WIN32)
+  set(WITH_WASAPI              OFF CACHE BOOL "" FORCE)
+endif()
+if(APPLE)
+  set(WITH_COREAUDIO           OFF CACHE BOOL "" FORCE)
+endif()
 
-# other features which are not especially useful as a python module
-set(WITH_ALEMBIC             OFF CACHE BOOL "" FORCE)
-set(WITH_BULLET              OFF CACHE BOOL "" FORCE)
+
+# -----------------------------------------------------------------------------
+# Input Device Support.
+
+# Other features which are not especially useful as a python module.
 set(WITH_INPUT_NDOF          OFF CACHE BOOL "" FORCE)
-set(WITH_INTERNATIONAL       OFF CACHE BOOL "" FORCE)
-set(WITH_NANOVDB             OFF CACHE BOOL "" FORCE)
-set(WITH_OPENCOLLADA         OFF CACHE BOOL "" FORCE)
-set(WITH_OPENVDB             OFF CACHE BOOL "" FORCE)
-set(WITH_X11_XINPUT          OFF CACHE BOOL "" FORCE)
+if(WIN32 OR APPLE)
+  set(WITH_INPUT_IME           OFF CACHE BOOL "" FORCE)
+endif()
 
-# Depends on Python install, do this to quiet warning.
-set(WITH_DRACO               OFF CACHE BOOL "" FORCE)
 
-# Jemalloc does not work with dlopen() of Python modules:
-# https://github.com/jemalloc/jemalloc/issues/1237
-set(WITH_MEM_JEMALLOC        OFF CACHE BOOL "" FORCE)
+# -----------------------------------------------------------------------------
+# Language Support.
 
-if(WIN32)
-  set(WITH_WINDOWS_BUNDLE_CRT  OFF CACHE BOOL "" FORCE)
-endif()
+set(WITH_INTERNATIONAL       OFF CACHE BOOL "" FORCE)



More information about the Bf-blender-cvs mailing list