From 891a037e9b4725b79117f6f2bc469b4b3a2eeeef Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sun, 17 Nov 2013 00:18:21 +0600 Subject: Skip .git files from submodules for install targets Also removed .svn checks when it's not longer needed. Some further tweaks (probably for OSX bundler) are likely needed. --- SConstruct | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) (limited to 'SConstruct') diff --git a/SConstruct b/SConstruct index e15616e198d..8c27424f617 100644 --- a/SConstruct +++ b/SConstruct @@ -784,6 +784,8 @@ if env['OURPLATFORM']=='darwin': dn.remove('.svn') if '_svn' in dn: dn.remove('_svn') + if '.git' in df: + df.remove('.git') dir=env['BF_INSTALLDIR']+dp[len(bundledir):] source=[dp+os.sep+f for f in df] blenderinstall.append(env.Install(dir=dir,source=source)) @@ -813,10 +815,8 @@ if env['OURPLATFORM']!='darwin': scriptpaths=['release/scripts'] for scriptpath in scriptpaths: for dp, dn, df in os.walk(scriptpath): - if '.svn' in dn: - dn.remove('.svn') - if '_svn' in dn: - dn.remove('_svn') + if '.git' in df: + df.remove('.git') if '__pycache__' in dn: # py3.2 cache dir dn.remove('__pycache__') @@ -840,8 +840,6 @@ if env['OURPLATFORM']!='darwin': # cycles python code dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles') source=os.listdir('intern/cycles/blender/addon') - if '.svn' in source: source.remove('.svn') - if '_svn' in source: source.remove('_svn') if '__pycache__' in source: source.remove('__pycache__') source=['intern/cycles/blender/addon/'+s for s in source] scriptinstall.append(env.Install(dir=dir,source=source)) @@ -849,8 +847,6 @@ if env['OURPLATFORM']!='darwin': # cycles kernel code dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel') source=os.listdir('intern/cycles/kernel') - if '.svn' in source: source.remove('.svn') - if '_svn' in source: source.remove('_svn') if '__pycache__' in source: source.remove('__pycache__') source.remove('kernel.cpp') source.remove('CMakeLists.txt') @@ -867,16 +863,12 @@ if env['OURPLATFORM']!='darwin': # svm dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel', 'svm') source=os.listdir('intern/cycles/kernel/svm') - if '.svn' in source: source.remove('.svn') - if '_svn' in source: source.remove('_svn') if '__pycache__' in source: source.remove('__pycache__') source=['intern/cycles/kernel/svm/'+s for s in source] scriptinstall.append(env.Install(dir=dir,source=source)) # closure dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel', 'closure') source=os.listdir('intern/cycles/kernel/closure') - if '.svn' in source: source.remove('.svn') - if '_svn' in source: source.remove('_svn') if '__pycache__' in source: source.remove('__pycache__') source=['intern/cycles/kernel/closure/'+s for s in source] scriptinstall.append(env.Install(dir=dir,source=source)) @@ -884,8 +876,6 @@ if env['OURPLATFORM']!='darwin': # licenses dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'license') source=os.listdir('intern/cycles/doc/license') - if '.svn' in source: source.remove('.svn') - if '_svn' in source: source.remove('_svn') if '__pycache__' in source: source.remove('__pycache__') source.remove('CMakeLists.txt') source=['intern/cycles/doc/license/'+s for s in source] @@ -920,11 +910,6 @@ if env['OURPLATFORM']!='darwin': colormanagement = os.path.join('release', 'datafiles', 'colormanagement') for dp, dn, df in os.walk(colormanagement): - if '.svn' in dn: - dn.remove('.svn') - if '_svn' in dn: - dn.remove('_svn') - dir = os.path.join(env['BF_INSTALLDIR'], VERSION, 'datafiles') dir += os.sep + os.path.basename(colormanagement) + dp[len(colormanagement):] @@ -946,10 +931,8 @@ if env['OURPLATFORM']!='darwin': for intpath in internationalpaths: for dp, dn, df in os.walk(intpath): - if '.svn' in dn: - dn.remove('.svn') - if '_svn' in dn: - dn.remove('_svn') + if '.git' in df: + df.remove('.git') # we only care about release/datafiles/fonts, release/datafiles/locales if check_path(dp, "fonts"): @@ -984,10 +967,6 @@ if env['OURPLATFORM']=='linux': icontargetlist = [] for tp, tn, tf in os.walk('release/freedesktop/icons'): - if '.svn' in tn: - tn.remove('.svn') - if '_svn' in tn: - tn.remove('_svn') for f in tf: iconlist.append(os.path.join(tp, f)) icontargetlist.append( os.path.join(*([env['BF_INSTALLDIR']] + tp.split(os.sep)[2:] + [f])) ) @@ -1013,10 +992,6 @@ if env['OURPLATFORM']=='linuxcross': textlist = [] texttargetlist = [] for tp, tn, tf in os.walk('release/text'): - if '.svn' in tn: - tn.remove('.svn') - if '_svn' in tn: - tn.remove('_svn') for f in tf: textlist.append(tp+os.sep+f) -- cgit v1.2.3