From a5917175d8c1a7cab83b401ae2f4affcd4ab8df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 21 Oct 2021 13:45:37 +0200 Subject: 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 --- source/creator/CMakeLists.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'source/creator/CMakeLists.txt') 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") -- cgit v1.2.3