From 4054ddc4c023c370c0b5f9383687e1bc4ef9396e Mon Sep 17 00:00:00 2001
From: Andreas Schenk <andreas_schenk@hms.harvard.edu>
Date: Wed, 17 Sep 2014 15:00:41 -0400
Subject: [PATCH] extended CopyyDependencies.cmake to pack in site-packages in
 PYTHONPATH

---
 cmake_support/CopyDependencies.cmake | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/cmake_support/CopyDependencies.cmake b/cmake_support/CopyDependencies.cmake
index a392ea5d2..d3f626b36 100644
--- a/cmake_support/CopyDependencies.cmake
+++ b/cmake_support/CopyDependencies.cmake
@@ -1006,6 +1006,9 @@ function(copy_python include_path version new_binary_path)
     file(GLOB python_libs "${python_root_dir}/${LIB_DIR}/libpython${version}.so*")
   endif()
   file(COPY ${python_libs} DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_DIR})
+  foreach( additional_directory $ENV{PYTHONPATH})
+    file(COPY ${additional_directory}/ DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_DIR}/python${version}/site-packages PATTERN "*.pyc" EXCLUDE)
+  endforeach()
   file(COPY ${python_root_dir}/bin/python${version} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
   set(${new_binary_path} "${CMAKE_INSTALL_PREFIX}/bin/python${version}" PARENT_SCOPE)
   string(REGEX REPLACE "pyexec=\"[^\n\$]*\"" "pyexec=\"\$DNG_BINDIR/python${version}\"\nexport PYTHONHOME=\$DNG_ROOT" ost_config "${ost_config}")
-- 
GitLab