diff options
author | Gary Oberbrunner <garyo@oberbrunner.com> | 2014-03-08 19:26:53 (GMT) |
---|---|---|
committer | Gary Oberbrunner <garyo@oberbrunner.com> | 2014-03-08 19:26:53 (GMT) |
commit | b992f1293c5a16c2dcde96a31844e78b09e769a1 (patch) | |
tree | 31feb6f8fcbbc04cf7260a38a74448f53025fbad | |
parent | 05031aa5e43d00b67dd4b60e743b63e1d7cf0e48 (diff) | |
parent | 9725c2beeebc701d8b0de0cffcd330fce3b6ddd8 (diff) | |
download | SCons-b992f1293c5a16c2dcde96a31844e78b09e769a1.zip SCons-b992f1293c5a16c2dcde96a31844e78b09e769a1.tar.gz SCons-b992f1293c5a16c2dcde96a31844e78b09e769a1.tar.bz2 |
Merged in techtonik/scons (pull request #111, fix scons.py run from source dir)
-rw-r--r-- | src/CHANGES.txt | 13 | ||||
-rw-r--r-- | src/script/scons.py | 18 |
2 files changed, 23 insertions, 8 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt index 52d8604..efae24b 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -4,7 +4,18 @@ Change Log -RELEASE 2.3.1.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE +RELEASE 2.3.2.alpha.yyyymmdd - NEW DATE WILL BE INSERTED HERE + From Anatoly Techtonik: + - Several improvements for running scons.py from source: + * engine files form source directory take priority over all other + importable versions + * message about scons.py running from source is removed to fix tests + that were failing because of this extra line in the output + * error message when SCons import fails now lists lookup paths + From Dirk Baechle: + - Update XML doc editor configuration + +RELEASE 2.3.1 From Andrew Featherstone: - Added support for EPUB output format to the DocBook tool. diff --git a/src/script/scons.py b/src/script/scons.py index 46e6d2b..8dcc371 100644 --- a/src/script/scons.py +++ b/src/script/scons.py @@ -85,6 +85,11 @@ scons_version = 'scons-%s' % __version__ # preferred order of scons lookup paths prefs = [] +# - running from source takes priority (since 2.3.2) +script_path = os.path.abspath(os.path.dirname(__file__)) +source_path = os.path.join(script_path, '..', 'engine') + +# - running from egg check try: import pkg_resources except ImportError: @@ -171,7 +176,7 @@ else: libs.extend([os.path.join(x, scons_version) for x in prefs]) libs.extend([os.path.join(x, 'scons') for x in prefs]) -sys.path = libs + sys.path +sys.path = [source_path] + libs + sys.path ############################################################################## # END STANDARD SCons SCRIPT HEADER @@ -181,12 +186,11 @@ if __name__ == "__main__": try: import SCons.Script except: - ROOT = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..', 'engine') - if os.path.exists(ROOT): - sys.path += [ROOT] - print("SCons import failed. Trying to run from source directory") - import SCons.Script - + print("Import failed. Unable to find SCons files in:") + for path in [source_path] + libs: + print " %s" % path + raise + # this does all the work, and calls sys.exit # with the proper exit status when done. SCons.Script.main() |