summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-10-17 11:54:28 +0200
committerGitHub <noreply@github.com>2021-10-17 11:54:28 +0200
commit37e330cadd12800b484ef89cd599dcb06f1ba539 (patch)
treeb318c80e8ab9373d4ee698d9f29d2c07e5fc5708
parent8da5d5328e11c5a4a8ea7e933fa2d59dd793b2c8 (diff)
downloadpylint-git-37e330cadd12800b484ef89cd599dcb06f1ba539.tar.gz
Add an exception at install for python < 3.6.2 (#5171)
* Add an exception for python < 3.6.2 See https://github.com/PyCQA/pylint/issues/5065 for reasoning Co-authored-by: Marc Mueller <30130371+cdce8p@users.noreply.github.com>
-rw-r--r--setup.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 606849326..a6ee6b4aa 100644
--- a/setup.py
+++ b/setup.py
@@ -1,3 +1,20 @@
+import sys
+
from setuptools import setup
+
+class PylintIncompatiblePythonError(Exception):
+ def __init__(self) -> None:
+ super().__init__(
+ "The last version compatible with Python <= 3.6.2 is pylint '2.9.3'. "
+ f"You're using {'.'.join([str(v) for v in sys.version_info[:3]])}. "
+ "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."
+ )
+
+
+if sys.version_info < (3, 6, 2):
+ raise PylintIncompatiblePythonError()
+
setup()