summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-04-30 21:39:10 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-04-30 21:39:10 (GMT)
commite0e279b85622275dfc4df0bfd5a50ec09694a9b7 (patch)
tree3e66e81e5c4174ef46939a7986d3e9a9e13ac58f
parent74bdae2ad13a9859b354f3ce5354d7c4f19ce414 (diff)
downloadswift-e0e279b85622275dfc4df0bfd5a50ec09694a9b7.zip
swift-e0e279b85622275dfc4df0bfd5a50ec09694a9b7.tar.bz2
Remove dependency on python 2.5 in SConscript file.
-rw-r--r--BuildTools/SCons/SConstruct2
-rw-r--r--Swiften/SConscript7
2 files changed, 7 insertions, 2 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index 2d9d200..c8459e1 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -93,6 +93,8 @@ if env["max_jobs"] :
SetOption("num_jobs", multiprocessing.cpu_count())
except NotImplementedError :
pass
+ except ImportError :
+ pass
# Default compiler flags
if env.get("distcc", False) :
diff --git a/Swiften/SConscript b/Swiften/SConscript
index f151d3a..e00e59b 100644
--- a/Swiften/SConscript
+++ b/Swiften/SConscript
@@ -1,4 +1,4 @@
-import os, re, Version
+import os, re, Version, os.path
Import("env")
@@ -359,6 +359,9 @@ if env["SCONS_STAGE"] == "build" :
])
# Generate the Swiften header
+ def relpath(path, start) :
+ i = len(os.path.commonprefix([path, start]))
+ return path[i+1:]
swiften_header = "#pragma once\n"
swiften_includes = []
top_path = env.Dir("..").abspath
@@ -368,7 +371,7 @@ if env["SCONS_STAGE"] == "build" :
for file in files :
if not file.endswith(".h") :
continue
- include = os.path.relpath(os.path.join(root, file), top_path)
+ include = relpath(os.path.join(root, file), top_path)
swiften_includes.append(include)
# Private modules
if root.endswith("Config") or root.endswith("Compress") :