summaryrefslogtreecommitdiff
path: root/astroid
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-04-27 20:50:40 +0200
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-05-24 21:07:56 +0200
commitbea1069da15b9c163fcf559c184bc44bc5dec8d4 (patch)
tree1a1078941763c26fd58024230490ca5ab6e3d0f5 /astroid
parente9ec079a21f63a1dbe2ab2f141d06d50d6e94752 (diff)
downloadastroid-git-bea1069da15b9c163fcf559c184bc44bc5dec8d4.tar.gz
Add scm_setuptools for packaging
Diffstat (limited to 'astroid')
-rw-r--r--astroid/__pkginfo__.py16
1 files changed, 5 insertions, 11 deletions
diff --git a/astroid/__pkginfo__.py b/astroid/__pkginfo__.py
index af53f056..9f8b5c17 100644
--- a/astroid/__pkginfo__.py
+++ b/astroid/__pkginfo__.py
@@ -26,17 +26,11 @@
"""astroid packaging information"""
-from typing import Optional
+from pkg_resources import DistributionNotFound, get_distribution
-__version__ = "2.5.6"
-# 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}"
+try:
+ __version__ = get_distribution("astroid").version
+except DistributionNotFound:
+ __version__ = "2.5.7+"
version = __version__