add python3 checks to avoid confusion from errors with python2.
authorCampbell Barton <ideasman42@gmail.com>
Sat, 19 Nov 2011 00:01:10 +0000 (00:01 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 19 Nov 2011 00:01:10 +0000 (00:01 +0000)
build_files/cmake/cmake_consistency_check.py
build_files/cmake/project_info.py
build_files/cmake/project_source_info.py

index be68455a113e7fa39337e8254b5b8ec62ef3307a..65a9442a90d75943fc8f58530b1de3e64053baa1 100755 (executable)
 
 # <pep8 compliant>
 
+import sys
+if not sys.version.startswith("3"):
+    print("\nPython3.x needed, found %s.\nAborting!\n" %
+          sys.version.partition(" ")[0])
+    sys.exit(1)
+
 from cmake_consistency_check_config import IGNORE, UTF8_CHECK, SOURCE_DIR
 
 import os
index 7162b324f944b3f355bdf9afbb2436a9f366957e..dca41849a491a8cd07323a8ec85d2e4f819e923f 100755 (executable)
@@ -44,7 +44,14 @@ __all__ = (
     "project_name_get"
 )
 
+
 import sys
+if not sys.version.startswith("3"):
+    print("\nPython3.x needed, found %s.\nAborting!\n" %
+          sys.version.partition(" ")[0])
+    sys.exit(1)
+
+
 import os
 from os.path import join, dirname, normpath, abspath, splitext, exists
 
index d4b48ccd859871ece6efc3ddffe2e8acfed82f51..a39ed94bd69d05a1ad8328ad42cb81a87ed97a5c 100644 (file)
@@ -25,6 +25,14 @@ __all__ = (
     "SOURCE_DIR",
     )
 
+
+import sys
+if not sys.version.startswith("3"):
+    print("\nPython3.x needed, found %s.\nAborting!\n" %
+          sys.version.partition(" ")[0])
+    sys.exit(1)
+
+
 import os
 from os.path import join, dirname, normpath, abspath