Browse Source

Print clearer exception when running setup.py under Python < 3.5.

Jelmer Vernooij 4 years ago
parent
commit
0f8dfecd6a
2 changed files with 12 additions and 0 deletions
  1. 5 0
      NEWS
  2. 7 0
      setup.py

+ 5 - 0
NEWS

@@ -1,3 +1,8 @@
+0.20.4	UNRELEASED
+
+ * Print a clearer exception when setup.py is executed on Python < 3.5.
+   (Jelmer Vernooij, #783)
+
 0.20.3	2020-06-14
 
  * Add support for remembering remote refs after push/pull.

+ 7 - 0
setup.py

@@ -15,6 +15,13 @@ import io
 import os
 import sys
 
+
+if sys.version_info < (3, 5):
+    raise Exception(
+        'Dulwich only supports Python 3.5 and later. '
+        'For 2.7 support, please install a version prior to 0.20')
+
+
 dulwich_version_string = '0.20.3'