SCons: install Python executable when its bundled
authorCampbell Barton <ideasman42@gmail.com>
Tue, 19 May 2015 06:17:49 +0000 (16:17 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 19 May 2015 06:44:19 +0000 (16:44 +1000)
build_files/scons/tools/Blender.py

index ecf34759033e10f07159654190ac6c197849124d..16bb19b59cd98ceb40f8eb2160f76c34c007496a 100644 (file)
@@ -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)