From ddb1a068e99c7abf086202d01a3114d8147cb3a9 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 19 May 2015 16:17:49 +1000 Subject: [PATCH] SCons: install Python executable when its bundled --- build_files/scons/tools/Blender.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index ecf34759033..16bb19b59cd 100644 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -843,6 +843,7 @@ def UnixPyBundle(target=None, source=None, env=None): py_src = env.subst( env['BF_PYTHON_LIBPATH'] + '/python'+env['BF_PYTHON_VERSION'] ) py_target = env.subst( dir + '/python/' + target_lib + '/python'+env['BF_PYTHON_VERSION'] ) + py_target_bin = env.subst(dir + '/python/bin') # This is a bit weak, but dont install if its been installed before, makes rebuilds quite slow. if os.path.exists(py_target): @@ -862,6 +863,11 @@ def UnixPyBundle(target=None, source=None, env=None): except: pass + # install the executable + run("rm -rf '%s'" % py_target_bin) + os.makedirs(py_target_bin) + run("cp '%s' '%s'" % (env.subst(env['BF_PYTHON_BINARY']), py_target_bin)) + run("cp -R '%s' '%s'" % (py_src, os.path.dirname(py_target))) run("rm -rf '%s/distutils'" % py_target) run("rm -rf '%s/lib2to3'" % py_target) -- 2.28.0