diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-05-19 09:17:49 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-05-19 09:44:19 +0300 |
commit | ddb1a068e99c7abf086202d01a3114d8147cb3a9 (patch) | |
tree | 33c554d919fadec4beaeb9f33f1776038a615c90 | |
parent | e698299e4f2aade0f526dbeb5ea9f7a3a5117527 (diff) |
SCons: install Python executable when its bundled
-rw-r--r-- | build_files/scons/tools/Blender.py | 6 |
1 files changed, 6 insertions, 0 deletions
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) |