Переглянути джерело

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 роки тому
батько
коміт
f9b37dae70
1 змінених файлів з 8 додано та 1 видалено
  1. 8 1
      utils/build.py

+ 8 - 1
utils/build.py

@@ -1,10 +1,17 @@
 #!/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 json
 import os
 import shutil
-import sys
 import tempfile