diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-09-07 15:58:16 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-09-07 15:58:16 +0300 |
commit | 870fcb3857ba36986d1d44ab4ac519897f8fb264 (patch) | |
tree | 5af1e3cb1010eebd7aa567a8b2bb0c64adc0a660 /build_files | |
parent | 272c53f8f01fef7190ac378fd32279054657f99b (diff) |
Cleanup: change Python version checks to include newer versions
Diffstat (limited to 'build_files')
-rwxr-xr-x | build_files/cmake/cmake_consistency_check.py | 2 | ||||
-rw-r--r-- | build_files/cmake/project_source_info.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/build_files/cmake/cmake_consistency_check.py b/build_files/cmake/cmake_consistency_check.py index b4c91e6ba4f..cdf4058d394 100755 --- a/build_files/cmake/cmake_consistency_check.py +++ b/build_files/cmake/cmake_consistency_check.py @@ -21,7 +21,7 @@ # <pep8 compliant> import sys -if not sys.version.startswith("3"): +if sys.version_info.major < 3: print("\nPython3.x needed, found %s.\nAborting!\n" % sys.version.partition(" ")[0]) sys.exit(1) diff --git a/build_files/cmake/project_source_info.py b/build_files/cmake/project_source_info.py index 6649f4620c8..f8067c216fd 100644 --- a/build_files/cmake/project_source_info.py +++ b/build_files/cmake/project_source_info.py @@ -25,8 +25,8 @@ __all__ = ( import sys -if not sys.version.startswith("3"): - print("\nPython3.x needed, found %s.\nAborting!\n" % +if not sys.version_info.major < 3: + print("\nPython3.x or newer needed, found %s.\nAborting!\n" % sys.version.partition(" ")[0]) sys.exit(1) |