Browse Source

Detect Python version when running build.py script and let user know the script won't run in Python < 2.7, suggest a download link, then quit

sole 12 years ago
parent
commit
f9b37dae70
1 changed files with 8 additions and 1 deletions
  1. 8 1
      utils/build.py

+ 8 - 1
utils/build.py

@@ -1,10 +1,17 @@
 #!/usr/bin/env python
 #!/usr/bin/env python
 
 
+import sys
+
+if sys.version_info < (2, 7):
+	print("ERROR: The build script requires Python 2.7 or higher.")
+	print("You can get an updated version here: http://www.python.org/download/releases/")
+	exit()
+
+
 import argparse
 import argparse
 import json
 import json
 import os
 import os
 import shutil
 import shutil
-import sys
 import tempfile
 import tempfile