Build system copy release/site-packages for windows
authorCampbell Barton <ideasman42@gmail.com>
Tue, 4 Mar 2014 17:12:21 +0000 (04:12 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 4 Mar 2014 17:13:35 +0000 (04:13 +1100)
build_files/scons/tools/Blender.py
source/creator/CMakeLists.txt

index 2015bb4c8a52d09e2fff08b971c6c680063ef6fd..3684401d0ccd5000675df82d6e7b69adf365c8e9 100644 (file)
@@ -643,6 +643,21 @@ def WinPyBundle(target=None, source=None, env=None):
     print("Unpacking '" + py_tar + "' to '" + py_target + "'")
     untar_pybundle(py_tar, py_target, exclude_re)
 
+    # --------------------
+    # Copy 'site-packages'
+    py_dir = env.subst(env['LCGDIR'])
+    if py_dir[0] == '#':
+        py_dir = py_dir[1:]
+    py_dir += '/release/site-packages'
+    # grr, we have to do one by one because the dir exists
+    for f in os.listdir(py_dir):
+        fn_src = os.path.join(py_dir, f)
+        fn_dst = os.path.join(py_target, f)
+
+        shutil.rmtree(fn_dst, False, printexception)
+        shutil.copytree(fn_src, fn_dst)
+
+
 
 def  my_appit_print(target, source, env):
     a = '%s' % (target[0])
index d765c33db7059784182064b4dd83210b045d1f90..0f8de9f80b56c5c6ab146de40b2c511a4550d824 100644 (file)
@@ -586,6 +586,17 @@ elseif(WIN32)
                                )
                        endif()
 
+                       # release/site-packages
+                       install(
+                               CODE
+                               "
+                               execute_process(COMMAND \"${CMAKE_COMMAND}\" -E copy_directory
+                                       ${LIBDIR}/release/site-packages
+                                       \"${TARGETDIR_VER}/python/lib/site-packages\")
+                               "
+                       )
+
+
                        # doesnt work, todo
                        # install(CODE "execute_process(COMMAND find ${TARGETDIR}/${BLENDER_VERSION}/python/lib/ -name '*.so' -exec strip -s {} '\;')")
                endif()