Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-03-04 21:19:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-03-04 21:19:55 +0400
commitadd6384213f56bbf09a8a6831408f5e29c03b2f6 (patch)
tree49f794bfe986cf50184a072d912e9d9cc28ed94a
parent2c4c4a56b84c90baa9bf93468baee6bb34d7a012 (diff)
Build system: use lstrip with scons
-rw-r--r--build_files/scons/tools/Blender.py20
1 files changed, 5 insertions, 15 deletions
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index 3684401d0cc..b8b9961b09a 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -595,17 +595,13 @@ def my_winpybundle_print(target, source, env):
def WinPyBundle(target=None, source=None, env=None):
import re
- py_tar= env.subst( env['LCGDIR'] )
- if py_tar[0]=='#':
- py_tar= py_tar[1:]
+ py_tar = env.subst(env['LCGDIR']).lstrip("#")
if env['BF_DEBUG']:
py_tar+= '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '_d.tar.gz'
else:
py_tar+= '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '.tar.gz'
- py_target = env.subst( env['BF_INSTALLDIR'] )
- if py_target[0]=='#':
- py_target=py_target[1:]
+ py_target = env.subst(env['BF_INSTALLDIR']).lstrip("#")
py_target = os.path.join(py_target, VERSION, 'python', 'lib')
def printexception(func,path,ex):
if os.path.exists(path): #do not report if path does not exist. eg on a fresh build.
@@ -628,14 +624,10 @@ def WinPyBundle(target=None, source=None, env=None):
# -------------
# Extract Numpy
- py_tar = env.subst(env['LCGDIR'])
- if py_tar[0] == '#':
- py_tar = py_tar[1:]
+ py_tar = env.subst(env['LCGDIR']).lstrip("#")
py_tar += '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '_numpy_1.8.tar.gz'
- py_target = env.subst(env['BF_INSTALLDIR'])
- if py_target[0] == '#':
- py_target = py_target[1:]
+ py_target = env.subst(env['BF_INSTALLDIR']).lstrip("#")
py_target = os.path.join(py_target, VERSION, 'python', 'lib', 'site-packages')
# rmtree handled above
# files are cleaned up in their archive
@@ -645,9 +637,7 @@ def WinPyBundle(target=None, source=None, env=None):
# --------------------
# Copy 'site-packages'
- py_dir = env.subst(env['LCGDIR'])
- if py_dir[0] == '#':
- py_dir = py_dir[1:]
+ py_dir = env.subst(env['LCGDIR']).lstrip("#")
py_dir += '/release/site-packages'
# grr, we have to do one by one because the dir exists
for f in os.listdir(py_dir):