From a030be2d1586f228b1ceec39e971cdba9d91d4d5 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sat, 16 Sep 2017 20:29:34 +0300 Subject: [PATCH] Auto-change development status classifier --- aiogram/utils/versions.py | 14 ++++++++++++++ setup.py | 6 +++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/aiogram/utils/versions.py b/aiogram/utils/versions.py index b606998a..d8e5adac 100644 --- a/aiogram/utils/versions.py +++ b/aiogram/utils/versions.py @@ -51,6 +51,20 @@ class Version: def raw_version(self): return self.raw_version + @property + def pypi_development_status(self): + if self.build == Stage.DEV: + status = '2 - Pre-Alpha' + elif self.build == Stage.ALPHA: + status = '3 - Alpha' + elif self.build == Stage.BETA: + status = '4 - Beta' + elif self.build == Stage.FINAL: + status = '5 - Production/Stable' + else: + status = '1 - Planning' + return f"Development Status :: {status}" + def get_version(self): """ Returns a PEP 440-compliant version number from VERSION. diff --git a/setup.py b/setup.py index 4952be85..d7922b07 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ from distutils.core import setup from setuptools import PackageFinder -from aiogram import __version__ as version +from aiogram import VERSION ALLOWED_SYMBOLS = string.ascii_letters + string.digits + '_-' @@ -41,7 +41,7 @@ def get_requirements(): setup( name='aiogram', - version=version, + version=VERSION.version, packages=PackageFinder.find(exclude=('tests', 'examples', 'docs',)), url='https://bitbucket.org/illemius/aiogram', license='MIT', @@ -50,7 +50,7 @@ setup( description='Is are pretty simple and fully asynchronously library for Telegram Bot API', long_description=get_description(), classifiers=[ - 'Development Status :: 5 - Production/Stable', + VERSION.pypi_development_status, # Automated change classifier by build stage 'Programming Language :: Python :: 3.6', 'Environment :: Console', 'Framework :: AsyncIO',