diff options
author | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-04-25 10:08:58 +0200 |
---|---|---|
committer | Pierre Sassoulas <pierre.sassoulas@gmail.com> | 2021-04-26 17:38:28 +0200 |
commit | 76a232e0cd3abb0f2d395cd2fe035046daef80fb (patch) | |
tree | 205a340f6c047340ee156abbd56f496aef8f3b61 | |
parent | a4fac223dfeb36952088ed361e27ee57c2ae45b8 (diff) | |
download | pylint-git-76a232e0cd3abb0f2d395cd2fe035046daef80fb.tar.gz |
Add scm_setuptools for packaging
-rw-r--r-- | pylint/__pkginfo__.py | 17 | ||||
-rw-r--r-- | setup.cfg | 2 | ||||
-rw-r--r-- | setup.py | 2 |
3 files changed, 8 insertions, 13 deletions
diff --git a/pylint/__pkginfo__.py b/pylint/__pkginfo__.py index dfc825fc9..8316089ec 100644 --- a/pylint/__pkginfo__.py +++ b/pylint/__pkginfo__.py @@ -1,19 +1,12 @@ # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/master/LICENSE -from typing import Optional - -__version__ = "2.8.1" -# For an official release, use 'alpha_version = False' and 'dev_version = None' -alpha_version: bool = False # Release will be an alpha version if True (ex: '1.2.3a6') -dev_version: Optional[int] = None - -if dev_version is not None: - if alpha_version: - __version__ += f"a{dev_version}" - else: - __version__ += f".dev{dev_version}" +from pkg_resources import DistributionNotFound, get_distribution +try: + __version__ = get_distribution("pylint").version +except DistributionNotFound: + __version__ = "2.8.2+" # Kept for compatibility reason, see https://github.com/PyCQA/pylint/issues/4399 numversion = tuple(__version__.split(".")) @@ -46,6 +46,8 @@ install_requires = mccabe>=0.6,<0.7 toml>=0.7.1 colorama;sys_platform=="win32" +setup_requires = + setuptools_scm python_requires = ~=3.6 [options.packages.find] @@ -1,3 +1,3 @@ from setuptools import setup -setup() +setup(use_scm_version=True) |