Skip to content

Commit

Permalink
Add scm_setuptools for packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Apr 26, 2021
1 parent a4fac22 commit 76a232e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 13 deletions.
17 changes: 5 additions & 12 deletions pylint/__pkginfo__.py
Original file line number Diff line number Diff line change
@@ -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("."))
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from setuptools import setup

setup()
setup(use_scm_version=True)

0 comments on commit 76a232e

Please sign in to comment.