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
@@ -69,22 +69,22 @@ vars.Add("libidn_libname", "LibIDN library name", os.name == "nt" and "libidn"
vars.Add(BoolVariable("need_idn", "Whether an IDN library is required. Without this, most internal binaries will fail", "true"))
vars.Add(PathVariable("libminiupnpc_includedir", "LibMiniUPNPC headers location", None, PathVariable.PathAccept))
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))
vars.Add(PathVariable("sqlite_libdir", "SQLite library location", None, PathVariable.PathAccept))
vars.Add("sqlite_libname", "SQLite library name", os.name == "nt" and "libsqlite3" or "sqlite3")
vars.Add("sqlite_force_bundled", "Force use of the bundled SQLite", None)
vars.Add(PathVariable("lua_includedir", "Lua headers location", None, PathVariable.PathAccept))
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)
vars.Add(PathVariable("editline_includedir", "Readline headers location", None, PathVariable.PathAccept))
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")
vars.Add(BoolVariable("try_avahi", "Try configuring for avahi?", "true"))
vars.Add(PathVariable("avahi_includedir", "Avahi headers location", None, PathVariable.PathAccept))
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index 5db30f8..d314ff3 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -555,7 +555,7 @@ else :
#Hunspell
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 = {}
if hunspell_prefix :
hunspell_flags = {"CPPPATH":[os.path.join(hunspell_prefix, "include")], "LIBPATH":[os.path.join(hunspell_prefix, "lib")]}
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
@@ -39,8 +39,8 @@ def getBuildVersion(root, project) :
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 :
patch = 60000
else :