[Mesa-dev] [PATCH] SConstruct: Fix PEP 8 issues.

Vinson Lee vlee at freedesktop.org
Mon Mar 16 23:15:31 PDT 2015


Signed-off-by: Vinson Lee <vlee at freedesktop.org>
---
 SConstruct | 66 ++++++++++++++++++++++++++++++++------------------------------
 1 file changed, 34 insertions(+), 32 deletions(-)

diff --git a/SConstruct b/SConstruct
index ef71ab6..f9d3d4c 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1,7 +1,7 @@
 #######################################################################
 # Top-level SConstruct
 #
-# For example, invoke scons as 
+# For example, invoke scons as
 #
 #   scons build=debug llvm=yes machine=x86
 #
@@ -12,13 +12,13 @@
 #   build='debug'
 #   llvm=True
 #   machine='x86'
-# 
+#
 # Invoke
 #
 #   scons -h
 #
 # to get the full list of options. See scons manpage for more info.
-#  
+#
 
 import os
 import os.path
@@ -34,14 +34,14 @@ opts = Variables('config.py')
 common.AddOptions(opts)
 
 env = Environment(
-	options = opts,
-	tools = ['gallium'],
-	toolpath = ['#scons'],	
-	ENV = os.environ,
+    options=opts,
+    tools=['gallium'],
+    toolpath=['#scons'],
+    ENV=os.environ,
 )
 
 # XXX: This creates a many problems as it saves...
-#opts.Save('config.py', env)
+# opts.Save('config.py', env)
 
 # Backwards compatability with old target configuration variable
 try:
@@ -50,10 +50,11 @@ except KeyError:
     pass
 else:
     targets = targets.split(',')
-    print 'scons: warning: targets option is deprecated; pass the targets on their own such as'
+    print 'scons: warning: targets option is deprecated; ' \
+        'pass the targets on their own such as'
     print
     print '  scons %s' % ' '.join(targets)
-    print 
+    print
     COMMAND_LINE_TARGETS.append(targets)
 
 
@@ -63,30 +64,31 @@ Help(opts.GenerateHelpText(env))
 # Environment setup
 
 with open("VERSION") as f:
-  mesa_version = f.read().strip()
-env.Append(CPPDEFINES = [
+    mesa_version = f.read().strip()
+env.Append(CPPDEFINES=[
     ('PACKAGE_VERSION', '\\"%s\\"' % mesa_version),
-    ('PACKAGE_BUGREPORT', '\\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\\"'),
+    ('PACKAGE_BUGREPORT',
+     '\\"https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa\\"'),
 ])
 
 # Includes
-env.Prepend(CPPPATH = [
-	'#/include',
+env.Prepend(CPPPATH=[
+    '#/include',
 ])
-env.Append(CPPPATH = [
-	'#/src/gallium/include',
-	'#/src/gallium/auxiliary',
-	'#/src/gallium/drivers',
-	'#/src/gallium/winsys',
+env.Append(CPPPATH=[
+    '#/src/gallium/include',
+    '#/src/gallium/auxiliary',
+    '#/src/gallium/drivers',
+    '#/src/gallium/winsys',
 ])
 
 # for debugging
-#print env.Dump()
+# print env.Dump()
 
 
 #######################################################################
-# Invoke host SConscripts 
-# 
+# Invoke host SConscripts
+#
 # For things that are meant to be run on the native host build machine, instead
 # of the target machine.
 #
@@ -94,11 +96,11 @@ env.Append(CPPPATH = [
 # Create host environent
 if env['crosscompile'] and not env['embedded']:
     host_env = Environment(
-        options = opts,
+        options=opts,
         # no tool used
-        tools = [],
-        toolpath = ['#scons'],
-        ENV = os.environ,
+        tools=[],
+        toolpath=['#scons'],
+        ENV=os.environ,
     )
 
     # Override options
@@ -118,8 +120,8 @@ if env['crosscompile'] and not env['embedded']:
 
     SConscript(
         'src/SConscript',
-        variant_dir = host_env['build_dir'],
-        duplicate = 0, # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
+        variant_dir=host_env['build_dir'],
+        duplicate=0  # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
     )
 
     env = target_env
@@ -133,9 +135,9 @@ Export('env')
 # http://www.scons.org/wiki/SimultaneousVariantBuilds
 
 SConscript(
-	'src/SConscript',
-	variant_dir = env['build_dir'],
-	duplicate = 0 # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
+    'src/SConscript',
+    variant_dir=env['build_dir'],
+    duplicate=0  # http://www.scons.org/doc/0.97/HTML/scons-user/x2261.html
 )
 
 
-- 
2.3.2



More information about the mesa-dev mailing list