move version string to telegram/version.py (#361)

This commit is contained in:
Jannes Höke 2016-07-29 17:40:11 +02:00 committed by Noam Meltzer
parent 4375820863
commit 587908457e
3 changed files with 26 additions and 3 deletions

View file

@ -2,7 +2,7 @@
"""The setup and build script for the python-telegram-bot library."""
import codecs
import telegram
import os
from setuptools import setup, find_packages
@ -17,8 +17,10 @@ def requirements():
return requirements_list
with codecs.open('README.rst', 'r', 'utf-8') as fd:
execfile(os.path.join('telegram', 'version.py'))
setup(name='python-telegram-bot',
version=telegram.__version__,
version=__version__,
author='Leandro Toledo',
author_email='devs@python-telegram-bot.org',
license='LGPLv3',

View file

@ -84,9 +84,10 @@ from .constants import (MAX_MESSAGE_LENGTH, MAX_CAPTION_LENGTH, SUPPORTED_WEBHOO
MAX_FILESIZE_DOWNLOAD, MAX_FILESIZE_UPLOAD,
MAX_MESSAGES_PER_SECOND_PER_CHAT, MAX_MESSAGES_PER_SECOND,
MAX_MESSAGES_PER_MINUTE_PER_GROUP)
from .version import __version__ # flake8: noqa
__author__ = 'devs@python-telegram-bot.org'
__version__ = '5.0.0'
__all__ = ['Audio', 'Bot', 'Chat', 'ChatMember', 'ChatAction', 'ChosenInlineResult',
'CallbackQuery', 'Contact', 'Document', 'Emoji', 'File', 'ForceReply',
'InlineKeyboardButton', 'InlineKeyboardMarkup', 'InlineQuery', 'InlineQueryResult',

20
telegram/version.py Normal file
View file

@ -0,0 +1,20 @@
#!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2016
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser Public License for more details.
#
# You should have received a copy of the GNU Lesser Public License
# along with this program. If not, see [http://www.gnu.org/licenses/].
__version__ = '5.0.0'