diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-28 08:59:44 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-28 08:59:44 +0300 |
commit | 5ef65a0a3bdf61b7b384cbff77832604ab8fad48 (patch) | |
tree | cad8875b96c7f912b167fe37a1bba31a067bbd83 /build_files/scons/tools/Blender.py | |
parent | e09189cf50682016e69fb207b010447c3bc6471d (diff) |
build system now exclude config-*, turtledemo when copying system python.
also remove __pycache__ dirs when cleaning (new in python 3.2)
Diffstat (limited to 'build_files/scons/tools/Blender.py')
-rw-r--r-- | build_files/scons/tools/Blender.py | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index cab245a4518..64d0a3f0caa 100644 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -624,31 +624,36 @@ def UnixPyBundle(target=None, source=None, env=None): print '\t"%s"' % py_target print '\t(skipping copy)\n' return - - + # Copied from source/creator/CMakeLists.txt, keep in sync. print 'Install python from:' - print '\t"%s" into...' % py_src - print '\t"%s"\n' % py_target - - run('rm -rf "%s"' % py_target) - try: os.makedirs(os.path.dirname(py_target)) # the final part is copied - except:pass + print '\t"%s" into...' % py_src + print '\t"%s"\n' % py_target + + run("rm -rf '%s'" % py_target) + try: + os.makedirs(os.path.dirname(py_target)) # the final part is copied + except: + pass + + 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) + run("rm -rf '%s/idlelib'" % py_target) + run("rm -rf '%s/tkinter'" % py_target) + run("rm -rf '%s/config'" % py_target) + + run("rm -rf '%s/site-packages'" % py_target) + run("mkdir '%s/site-packages'" % py_target) # python needs it.' + + run("rm -f '%s/lib-dynload/_tkinter.so'" % py_target) + run("find '%s' -type d -name 'test' -prune -exec rm -rf {} ';'" % py_target) + run("find '%s' -type d -name 'config-*' -prune -exec rm -rf {} ';'" % py_target) + run("find '%s' -type d -name 'turtledemo' -prune -exec rm -rf {} ';'" % py_target) + run("find '%s' -type d -name '__pycache__' -exec rm -rf {} ';'" % py_target) + run("find '%s' -name '*.py[co]' -exec rm -rf {} ';'" % py_target) + run("find '%s' -name '*.so' -exec strip -s {} ';'" % py_target) - 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) - run('rm -rf "%s/idlelib"' % py_target) - run('rm -rf "%s/tkinter"' % py_target) - run('rm -rf "%s/config"' % py_target) - - run('rm -rf "%s/site-packages"' % py_target) - run('mkdir "%s/site-packages"' % py_target) # python needs it.' - - run('rm -f "%s/lib-dynload/_tkinter.so"' % py_target) - run('find "%s" -name "test" -prune -exec rm -rf {} \;' % py_target) - run('find "%s" -name "*.py?" -exec rm -rf {} \;' % py_target) - run('find "%s" -name "*.so"-exec strip -s {} \;' % py_target) #### END ACTION STUFF ######### |