summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/CHANGES.txt3
-rw-r--r--src/RELEASE.txt2
-rw-r--r--src/script/scons.py13
3 files changed, 17 insertions, 1 deletions
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index 0039c32..6c16a4a 100644
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -25,6 +25,9 @@ RELEASE X.X.X - XXX
Compilers. This will be rolled out to other platforms/tools
in the future.
+ - Add check for python >= 3.0.0 and exit gracefully.
+ For 1.3 python >= 1.5.2 and < 3.0.0 are supported
+
From Lukas Erlinghagen:
- Have AddOption() remove variables from the list of
diff --git a/src/RELEASE.txt b/src/RELEASE.txt
index 5691dd7..8050c03 100644
--- a/src/RELEASE.txt
+++ b/src/RELEASE.txt
@@ -34,7 +34,7 @@ RELEASE 1.2.0.d20090223 - Mon, 23 Feb 2009 08:41:06 -0800
features will still be supported in 1.3.0 but will generate
mandatory, non-disableable warnings:
- -- Support for Python versions 1.5, 1.6, 2.0 and 2.1.
+ -- Support for Python versions 1.5, 1.6, 2.0, 2.1, 2.2 and 2.3.
-- The overrides= keyword argument to the Builder() call.
-- The scanner= keyword argument to the Builder() call.
-- The BuildDir() function and env.BuildDir() method.
diff --git a/src/script/scons.py b/src/script/scons.py
index 94ecccb..fb4cf52 100644
--- a/src/script/scons.py
+++ b/src/script/scons.py
@@ -56,6 +56,19 @@ import sys
# followed by generic) so we pick up the right version of the build
# engine modules if they're in either directory.
+
+# Check to see if the python version is > 3.0 which is currently unsupported
+# If so exit with error message
+try:
+ if sys.version_info >= (3,0,0):
+ msg = "scons: *** SCons version %s does not run under Python version %s.\n"
+ sys.stderr.write(msg % (__version__, sys.version.split()[0]))
+ sys.exit(1)
+except AttributeError:
+ # Pre-1.6 Python has no sys.version_info
+ # No need to check version as we then know the version is < 3.0.0 and supported
+ pass
+
script_dir = sys.path[0]
if script_dir in sys.path: