summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorbdbaddog <devnull@localhost>2015-02-16 12:55:16 -0800
committerbdbaddog <devnull@localhost>2015-02-16 12:55:16 -0800
commit5b070062b6fb224259d85f28bef60f15ad36effc (patch)
tree361d3db3a8fcac7fb78abf2d606f450a44e45fc4 /SConstruct
parentadaa01f98410d2fc32658a1a55feb7c2f8e707f1 (diff)
downloadscons-5b070062b6fb224259d85f28bef60f15ad36effc.tar.gz
Change to use function to determine if it'sa windows platform. checking for win32 was insufficient on 64 bit windows which distutils sets the platform to win-amd64
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct14
1 files changed, 10 insertions, 4 deletions
diff --git a/SConstruct b/SConstruct
index 63670019..ae1a06ed 100644
--- a/SConstruct
+++ b/SConstruct
@@ -48,6 +48,12 @@ copyright = "Copyright (c) %s The SCons Foundation" % copyright_years
platform = distutils.util.get_platform()
+def is_windows():
+ if platform.startswith('win'):
+ return True
+ else:
+ return False
+
SConsignFile()
#
@@ -56,7 +62,7 @@ SConsignFile()
#
def whereis(file):
exts = ['']
- if platform == "win32":
+ if is_windows():
exts += ['.exe']
for dir in os.environ['PATH'].split(os.pathsep):
f = os.path.join(dir, file)
@@ -267,7 +273,7 @@ test_local_zip_dir = os.path.join(build_dir, "test-local-zip")
unpack_tar_gz_dir = os.path.join(build_dir, "unpack-tar-gz")
unpack_zip_dir = os.path.join(build_dir, "unpack-zip")
-if platform == "win32":
+if is_windows():
tar_hflag = ''
python_project_subinst_dir = os.path.join("Lib", "site-packages", project)
project_script_subinst_dir = 'Scripts'
@@ -1112,7 +1118,7 @@ for p in [ scons ]:
for script in scripts:
# add .py extension for scons-local scripts on non-windows platforms
- if platform == "win32":
+ if is_windows():
break
local_script = os.path.join(build_dir_local, script)
commands.append(Move(local_script + '.py', local_script))
@@ -1136,7 +1142,7 @@ for p in [ scons ]:
Local(l)
if gzip:
- if platform == "win32":
+ if is_windows():
# avoid problem with tar interpreting c:/ as a remote machine
tar_cargs = '-cz --force-local -f'
else: