summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2014-10-13 09:44:03 (GMT)
committerKevin Smith <git@kismith.co.uk>2014-10-13 10:30:12 (GMT)
commit3f9c73993358b3636e3244f3e29cb4ee916e7b02 (patch)
tree334256f3dd7880f94537e4833ca76fab31fd65f9
parentc7cd9c8d239c1c5d604de8862625741754138771 (diff)
downloadswift-contrib-3f9c73993358b3636e3244f3e29cb4ee916e7b02.zip
swift-contrib-3f9c73993358b3636e3244f3e29cb4ee916e7b02.tar.bz2
Regress Python requirement to 2.4 again
Test-information: Ran through the configuration step on a machine with only Python 2.4 Change-Id: I3d5ba54395ede875c7f21c2769151fe6d308e760
-rw-r--r--BuildTools/SCons/SConscript.boot8
-rw-r--r--BuildTools/SCons/SConstruct2
-rw-r--r--BuildTools/SCons/Version.py4
3 files changed, 7 insertions, 7 deletions
diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot
index 0a4eb33..10fc7d3 100644
--- a/BuildTools/SCons/SConscript.boot
+++ b/BuildTools/SCons/SConscript.boot
@@ -71,6 +71,6 @@ vars.Add(PathVariable("libminiupnpc_includedir", "LibMiniUPNPC headers location"
vars.Add(PathVariable("libminiupnpc_libdir", "LibMiniUPNPC library location", None, PathVariable.PathAccept))
-vars.Add("libminiupnpc_libname", "LibMiniUPNPC library name", "libminiupnpc" if os.name == "nt" else "miniupnpc")
+vars.Add("libminiupnpc_libname", "LibMiniUPNPC library name", os.name == "nt" and "libminiupnpc" or "miniupnpc")
vars.Add(PathVariable("libnatpmp_includedir", "LibNATPMP headers location", None, PathVariable.PathAccept))
vars.Add(PathVariable("libnatpmp_libdir", "LibNATPMP library location", None, PathVariable.PathAccept))
-vars.Add("libnatpmp_libname", "LibNATPMP library name", "libnatpmp" if os.name == "nt" else "natpmp")
+vars.Add("libnatpmp_libname", "LibNATPMP library name", os.name == "nt" and "libnatpmp" or "natpmp")
vars.Add(PathVariable("sqlite_includedir", "SQLite headers location", None, PathVariable.PathAccept))
@@ -81,3 +81,3 @@ vars.Add(PathVariable("lua_includedir", "Lua headers location", None, PathVariab
vars.Add(PathVariable("lua_libdir", "Lua library location", None, PathVariable.PathAccept))
-vars.Add("lua_libname", "Lua library name", "liblua" if os.name == "nt" else "lua")
+vars.Add("lua_libname", "Lua library name", os.name == "nt" and "liblua" or "lua")
vars.Add("lua_force_bundled", "Force use of the bundled Lua", None)
@@ -86,3 +86,3 @@ vars.Add(PathVariable("editline_includedir", "Readline headers location", None,
vars.Add(PathVariable("editline_libdir", "Readline library location", None, PathVariable.PathAccept))
-vars.Add("editline_libname", "Readline library name", "libedit" if os.name == "nt" else "edit")
+vars.Add("editline_libname", "Readline library name", os.name == "nt" and "libedit" or "edit")
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index 5db30f8..d314ff3 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -557,3 +557,3 @@ else :
hunspell_env = conf_env.Clone()
-hunspell_prefix = env["hunspell"] if isinstance(env.get("hunspell", False), str) else ""
+hunspell_prefix = isinstance(env.get("hunspell", False), str) and env["hunspell"] or ""
hunspell_flags = {}
diff --git a/BuildTools/SCons/Version.py b/BuildTools/SCons/Version.py
index 2f3b5a5..4fd9171 100644
--- a/BuildTools/SCons/Version.py
+++ b/BuildTools/SCons/Version.py
@@ -41,4 +41,4 @@ def convertToWindowsVersion(version) :
version_match = re.match("(\d+)\.(\d+)(.*)", version)
- major = int(version_match.group(1)) if version_match else 0
- minor = int(version_match.group(2)) if version_match else 0
+ major = version_match and int(version_match.group(1)) or 0
+ minor = version_match and int(version_match.group(2)) or 0
if version_match and len(version_match.group(3)) == 0 :