summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-10-17 11:05:18 +0200
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-10-17 11:06:36 +0200
commitb2cb35bd584d5c866971afa366a65b1ce09a0319 (patch)
treeff5652722320d0a429f171d1e69c0d026ce80b61
parentd3b27d8aeeb27441405d4183feb7b18a91925093 (diff)
downloadpylint-git-add-warning-for-3.6.0or3.6.1.tar.gz
Add an exception for python < 3.6.2add-warning-for-3.6.0or3.6.1
See https://github.com/PyCQA/pylint/issues/5065 for reasoning
-rw-r--r--setup.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 606849326..20c0f86af 100644
--- a/setup.py
+++ b/setup.py
@@ -1,3 +1,21 @@
+import sys
+
from setuptools import setup
+
+class PylintIncompatiblePythonError(Exception):
+ def __init__(self, major, minor, patch):
+ super().__init__(
+ f"The last version compatible with python <= 3.6.2 is pylint '2.9.3'."
+ f"You're using {major}.{minor}.{patch}. "
+ "Please install pylint 2.9.3 explicitly or upgrade your python interpreter "
+ "to at least 3.6.2. Remember that python 3.6 end life is December 2021."
+ "See https://github.com/PyCQA/pylint/issues/5065 for more detail."
+ )
+
+
+version = sys.version_info[:3]
+if version < (3, 6, 2):
+ raise PylintIncompatiblePythonError(*version)
+
setup()