summaryrefslogtreecommitdiff
path: root/script/scons
diff options
context:
space:
mode:
authorJörg Frings-Fürst <jff@merkur>2014-07-26 11:45:47 +0200
committerJörg Frings-Fürst <jff@merkur>2014-07-26 11:45:47 +0200
commit7c6b954c00c2a2eed2e975ec797216c515cd249d (patch)
tree475c0ae1b3b3b8be085b54420894896688ea363c /script/scons
parent2176ae74d2f856582dd1e498a63a31949a7e19e2 (diff)
Imported Upstream version 2.3.2upstream/2.3.2
Diffstat (limited to 'script/scons')
-rw-r--r--script/scons27
1 files changed, 17 insertions, 10 deletions
diff --git a/script/scons b/script/scons
index 87919a1..b2823b6 100644
--- a/script/scons
+++ b/script/scons
@@ -2,7 +2,7 @@
#
# SCons - a Software Constructor
#
-# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 The SCons Foundation
+# Copyright (c) 2001 - 2014 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -23,21 +23,22 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "src/script/scons.py 2014/03/02 14:18:15 garyo"
+__revision__ = "src/script/scons.py 2014/07/05 09:42:21 garyo"
-__version__ = "2.3.1"
+__version__ = "2.3.2"
__build__ = ""
__buildsys__ = "lubuntu"
-__date__ = "2014/03/02 14:18:15"
+__date__ = "2014/07/05 09:42:21"
__developer__ = "garyo"
import os
import sys
+
##############################################################################
# BEGIN STANDARD SCons SCRIPT HEADER
#
@@ -72,6 +73,11 @@ libs = []
if "SCONS_LIB_DIR" in os.environ:
libs.append(os.environ["SCONS_LIB_DIR"])
+# - running from source takes priority (since 2.3.2), excluding SCONS_LIB_DIR settings
+script_path = os.path.abspath(os.path.dirname(__file__))
+source_path = os.path.join(script_path, '..', 'engine')
+libs.append(source_path)
+
local_version = 'scons-local-' + __version__
local = 'scons-local'
if script_dir:
@@ -85,6 +91,8 @@ scons_version = 'scons-%s' % __version__
# preferred order of scons lookup paths
prefs = []
+
+# - running from egg check
try:
import pkg_resources
except ImportError:
@@ -181,12 +189,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 libs:
+ print " %s" % path
+ raise
+
# this does all the work, and calls sys.exit
# with the proper exit status when done.
SCons.Script.main()