]> arthur.barton.de Git - bup.git/blobdiff - lib/cmd/bup.c
Require python 3.7+
[bup.git] / lib / cmd / bup.c
index 0d002a91c8bee8fea55d71179e0ff5861aa799dc..e61f10610c4bb98eb673c86cd947e01584329c10 100644 (file)
@@ -7,6 +7,14 @@
 //   http://docs.python.org/3/c-api/intro.html#include-files
 #include <Python.h>
 
+#if PY_MAJOR_VERSION < 3 || (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 7)
+#define BUP_STR(x) #x
+#define BUP_XSTR(x) BUP_STR(x)
+#pragma message "Python versions older than 3.7 are not supported; detected X.Y " \
+    BUP_XSTR(PY_MAJOR_VERSION) "." BUP_XSTR(PY_MINOR_VERSION)
+#error "Halting"
+#endif
+
 #include <libgen.h>
 #include <limits.h>
 #include <stdarg.h>