diff options
-rw-r--r-- | BuildTools/SCons/SConstruct | 2 | ||||
-rw-r--r-- | Swiften/SConscript | 7 |
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") : |