fix for building on ubuntu 11.04 (pre-release), also remove WITH_INSTALL from cache.
[blender.git] / SConstruct
index 03e61cd06b66297f0761f5f7e1dc3f2715c5abec..49c5ae98249124474ab74177c9ac985d62ca4d48 100644 (file)
@@ -60,6 +60,10 @@ import bcolors
 
 EnsureSConsVersion(1,0,0)
 
+# Before we do anything, let's check if we have a sane os.environ
+if not btools.check_environ():
+    Exit()
+
 BlenderEnvironment = Blender.BlenderEnvironment
 B = Blender
 
@@ -489,11 +493,13 @@ if  env['OURPLATFORM']!='darwin':
                         dn.remove('.svn')
                     if '_svn' in dn:
                         dn.remove('_svn')
-                    
+                    if '__pycache__' in dn:  # py3.2 cache dir
+                        dn.remove('__pycache__')
+
                     dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
                     dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):]
-                    
-                    source=[os.path.join(dp, f) for f in df if f[-3:]!='pyc']
+
+                    source=[os.path.join(dp, f) for f in df if not f.endswith(".pyc")]
                     # To ensure empty dirs are created too
                     if len(source)==0:
                         env.Execute(Mkdir(dir))