Skip to content

Commit 5879084

Browse files
jh0kertsnoam
authored andcommitted
move version string to telegram/version.py (python-telegram-bot#361)
1 parent 4375820 commit 5879084

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"""The setup and build script for the python-telegram-bot library."""
33

44
import codecs
5-
import telegram
5+
import os
66
from setuptools import setup, find_packages
77

88

@@ -17,8 +17,10 @@ def requirements():
1717
return requirements_list
1818

1919
with codecs.open('README.rst', 'r', 'utf-8') as fd:
20+
execfile(os.path.join('telegram', 'version.py'))
21+
2022
setup(name='python-telegram-bot',
21-
version=telegram.__version__,
23+
version=__version__,
2224
author='Leandro Toledo',
2325
author_email='devs@python-telegram-bot.org',
2426
license='LGPLv3',

telegram/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,10 @@
8484
MAX_FILESIZE_DOWNLOAD, MAX_FILESIZE_UPLOAD,
8585
MAX_MESSAGES_PER_SECOND_PER_CHAT, MAX_MESSAGES_PER_SECOND,
8686
MAX_MESSAGES_PER_MINUTE_PER_GROUP)
87+
from .version import __version__ # flake8: noqa
8788

8889
__author__ = 'devs@python-telegram-bot.org'
89-
__version__ = '5.0.0'
90+
9091
__all__ = ['Audio', 'Bot', 'Chat', 'ChatMember', 'ChatAction', 'ChosenInlineResult',
9192
'CallbackQuery', 'Contact', 'Document', 'Emoji', 'File', 'ForceReply',
9293
'InlineKeyboardButton', 'InlineKeyboardMarkup', 'InlineQuery', 'InlineQueryResult',

telegram/version.py

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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy