Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2021-10-21 14:45:37 +0300
committerSybren A. Stüvel <sybren@blender.org>2021-10-21 14:46:33 +0300
commita5917175d8c1a7cab83b401ae2f4affcd4ab8df4 (patch)
tree353010c4089a3a8bf29efa27b4d9e31d4a71d42a /source/creator
parent417ce7ffc1bbb9da15e82b6b81537bc86831f21c (diff)
Deps: Python, bundle zstandard package
This package allows Python scripts to handle compressed blend files (see rB2ea66af742bc). This is for example needed by Blender Asset Tracer to send files to a Flamenco render farm. This change includes a new `WITH_PYTHON_INSTALL_ZSTANDARD` build-time option, to control whether to actually install the package. For this the already-existing approach for Requests was copied. Reviewed By: LazyDodo, mont29, brecht Differential Revision: https://developer.blender.org/D12777
Diffstat (limited to 'source/creator')
-rw-r--r--source/creator/CMakeLists.txt18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index 1d5d1491c7a..5ee9a3f4342 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -642,6 +642,24 @@ if(UNIX AND NOT APPLE)
unset(_suffix)
endif()
+ if(WITH_PYTHON_INSTALL_ZSTANDARD)
+ # Install to the same directory as the source, so debian-like
+ # distros are happy with their policy.
+ set(_suffix "site-packages")
+ if(${PYTHON_NUMPY_PATH} MATCHES "dist-packages")
+ set(_suffix "dist-packages")
+ endif()
+ install(
+ DIRECTORY ${PYTHON_NUMPY_PATH}/zstandard
+ DESTINATION ${TARGETDIR_VER}/python/${_target_LIB}/python${PYTHON_VERSION}/${_suffix}
+ PATTERN ".svn" EXCLUDE
+ PATTERN "__pycache__" EXCLUDE # * any cache *
+ PATTERN "*.pyc" EXCLUDE # * any cache *
+ PATTERN "*.pyo" EXCLUDE # * any cache *
+ )
+ unset(_suffix)
+ endif()
+
# Copy requests, we need to generalize site-packages
if(WITH_PYTHON_INSTALL_REQUESTS)
set(_suffix "site-packages")