diff --git a/lib/init.py b/lib/init.py index 33e6edc..18da1da 100644 --- a/lib/init.py +++ b/lib/init.py @@ -2,6 +2,13 @@ import os import argparse import glob import json +import sys + +def check_python_version(): + python_version = sys.version_info + if not (python_version.major >= 3 and python_version.minor >= 3): + print("Minimum Python version needed: 3.3.0") + sys.exit(1) def init(): diff --git a/libinstaller.py b/libinstaller.py index 91f03f7..6b8689f 100755 --- a/libinstaller.py +++ b/libinstaller.py @@ -7,10 +7,13 @@ from lib.shell import get_from_command from lib.toolchain import get_compiler_version, get_mpi_version, set_toolchain from lib.sort import sort_libs_by_dependencies from lib.installer import install_lib -from lib.init import init +from lib.init import init, check_python_version SCRIPT_VERSION = "v0.3" +# check if Python >=3.3.0 is used +check_python_version() + # initialization by argparser arg_namespace, args = init()