summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2016-10-25 03:08:59 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2016-10-25 03:08:59 (GMT)
commit3031330216256cbff09b5631fdf68fa75d2439f2 (patch)
treebb66fffcacb1f35312655df22f5f6e50ae7506d5 /src/engine/SCons
parentcff6d51e2d64ab0a716c1321ea5afb1c99a12b52 (diff)
downloadSCons-3031330216256cbff09b5631fdf68fa75d2439f2.zip
SCons-3031330216256cbff09b5631fdf68fa75d2439f2.tar.gz
SCons-3031330216256cbff09b5631fdf68fa75d2439f2.tar.bz2
Fix some minor formatting issues flagged by pycharms
Diffstat (limited to 'src/engine/SCons')
-rw-r--r--src/engine/SCons/Platform/__init__.py1
-rw-r--r--src/engine/SCons/Platform/win32.py23
-rw-r--r--src/engine/SCons/Tool/__init__.py10
3 files changed, 22 insertions, 12 deletions
diff --git a/src/engine/SCons/Platform/__init__.py b/src/engine/SCons/Platform/__init__.py
index 7f4639f..ebdbb4c 100644
--- a/src/engine/SCons/Platform/__init__.py
+++ b/src/engine/SCons/Platform/__init__.py
@@ -56,6 +56,7 @@ import SCons.Errors
import SCons.Subst
import SCons.Tool
+
def platform_default():
"""Return the platform string for our execution environment.
diff --git a/src/engine/SCons/Platform/win32.py b/src/engine/SCons/Platform/win32.py
index 269007d..cdbb824 100644
--- a/src/engine/SCons/Platform/win32.py
+++ b/src/engine/SCons/Platform/win32.py
@@ -117,6 +117,7 @@ except ImportError:
# you had better have cmd or command.com in your PATH when you run
# scons.
+
def piped_spawn(sh, escape, cmd, args, env, stdout, stderr):
# There is no direct way to do that in python. What we do
# here should work for most cases:
@@ -137,8 +138,7 @@ def piped_spawn(sh, escape, cmd, args, env, stdout, stderr):
stderrRedirected = 0
for arg in args:
# are there more possibilities to redirect stdout ?
- if (arg.find( ">", 0, 1 ) != -1 or
- arg.find( "1>", 0, 2 ) != -1):
+ if arg.find( ">", 0, 1 ) != -1 or arg.find( "1>", 0, 2 ) != -1:
stdoutRedirected = 1
# are there more possibilities to redirect stderr ?
if arg.find( "2>", 0, 2 ) != -1:
@@ -179,6 +179,7 @@ def piped_spawn(sh, escape, cmd, args, env, stdout, stderr):
pass
return ret
+
def exec_spawn(l, env):
try:
result = spawnve(os.P_WAIT, l[0], l, env)
@@ -198,6 +199,7 @@ def exec_spawn(l, env):
sys.stderr.write("scons: unknown OSError exception code %d - '%s': %s\n" % (e[0], command, e[1]))
return result
+
def spawn(sh, escape, cmd, args, env):
if not sh:
sys.stderr.write("scons: Could not find command interpreter, is it in your PATH?\n")
@@ -217,6 +219,7 @@ def escape(x):
# Get the windows system directory name
_system_root = None
+
def get_system_root():
global _system_root
if _system_root is not None:
@@ -244,8 +247,14 @@ def get_system_root():
_system_root = val
return val
-# Get the location of the program files directory
+
def get_program_files_dir():
+ """
+ Get the location of the program files directory
+ Returns
+ -------
+
+ """
# Now see if we can look in the registry...
val = ''
if SCons.Util.can_read_reg:
@@ -266,10 +275,9 @@ def get_program_files_dir():
return val
-
-# Determine which windows CPU were running on.
class ArchDefinition(object):
"""
+ Determine which windows CPU were running on.
A class for defining architecture-specific settings and logic.
"""
def __init__(self, arch, synonyms=[]):
@@ -299,6 +307,7 @@ for a in SupportedArchitectureList:
for s in a.synonyms:
SupportedArchitectureMap[s] = a
+
def get_architecture(arch=None):
"""Returns the definition for the specified architecture string.
@@ -312,6 +321,7 @@ def get_architecture(arch=None):
arch = os.environ.get('PROCESSOR_ARCHITECTURE')
return SupportedArchitectureMap.get(arch, ArchDefinition('', ['']))
+
def generate(env):
# Attempt to find cmd.exe (for WinNT/2k/XP) or
# command.com for Win9x
@@ -357,7 +367,6 @@ def generate(env):
if not cmd_interp:
cmd_interp = env.Detect('command')
-
if 'ENV' not in env:
env['ENV'] = {}
@@ -369,7 +378,7 @@ def generate(env):
# for SystemDrive because it's related.
#
# Weigh the impact carefully before adding other variables to this list.
- import_env = [ 'SystemDrive', 'SystemRoot', 'TEMP', 'TMP' ]
+ import_env = ['SystemDrive', 'SystemRoot', 'TEMP', 'TMP' ]
for var in import_env:
v = os.environ.get(var)
if v:
diff --git a/src/engine/SCons/Tool/__init__.py b/src/engine/SCons/Tool/__init__.py
index 45d0aa1..cc5a508 100644
--- a/src/engine/SCons/Tool/__init__.py
+++ b/src/engine/SCons/Tool/__init__.py
@@ -925,9 +925,9 @@ class ToolInitializerMethod(object):
def get_builder(self, env):
"""
- Returns the appropriate real Builder for this method name
- after having the associated ToolInitializer object apply
- the appropriate Tool module.
+ Returns the appropriate real Builder for this method name
+ after having the associated ToolInitializer object apply
+ the appropriate Tool module.
"""
builder = getattr(env, self.__name__)
@@ -989,8 +989,8 @@ class ToolInitializer(object):
def apply_tools(self, env):
"""
- Searches the list of associated Tool modules for one that
- exists, and applies that to the construction environment.
+ Searches the list of associated Tool modules for one that
+ exists, and applies that to the construction environment.
"""
for t in self.tools:
tool = SCons.Tool.Tool(t)