From a06e0958ca2694cee93dcebdfe627a262fed69e2 Mon Sep 17 00:00:00 2001 From: Daniel Lemire Date: Wed, 4 Nov 2020 13:52:52 -0500 Subject: [PATCH] We do not want the amalgamate.py script to run *ever* if you do not have at least Python 3. (#1290) --- singleheader/amalgamate.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/singleheader/amalgamate.py b/singleheader/amalgamate.py index a4feb40dd..2872da635 100755 --- a/singleheader/amalgamate.py +++ b/singleheader/amalgamate.py @@ -10,6 +10,10 @@ import os import re import shutil +if sys.version_info < (3, 0): + sys.stdout.write("Sorry, requires Python 3.x or better\n") + sys.exit(1) + SCRIPTPATH = os.path.dirname(os.path.abspath(sys.argv[0])) PROJECTPATH = os.path.dirname(SCRIPTPATH)