2015-07-08 23:22:58 +02:00
|
|
|
#!/usr/bin/env python
|
2016-05-25 00:43:16 +02:00
|
|
|
"""The setup and build script for the python-telegram-bot library."""
|
2015-07-08 23:22:58 +02:00
|
|
|
|
2016-05-25 00:43:16 +02:00
|
|
|
import codecs
|
2016-07-29 17:40:11 +02:00
|
|
|
import os
|
2020-02-02 21:56:25 +01:00
|
|
|
import sys
|
|
|
|
|
2015-07-08 23:22:58 +02:00
|
|
|
from setuptools import setup, find_packages
|
|
|
|
|
|
|
|
|
2015-11-10 15:27:18 +01:00
|
|
|
def requirements():
|
|
|
|
"""Build the requirements list for this project"""
|
|
|
|
requirements_list = []
|
|
|
|
|
|
|
|
with open('requirements.txt') as requirements:
|
|
|
|
for install in requirements:
|
|
|
|
requirements_list.append(install.strip())
|
|
|
|
|
|
|
|
return requirements_list
|
|
|
|
|
2016-08-10 21:39:14 +02:00
|
|
|
|
2017-03-11 15:51:20 +01:00
|
|
|
packages = find_packages(exclude=['tests*'])
|
2020-02-02 21:56:25 +01:00
|
|
|
requirements = requirements()
|
|
|
|
|
|
|
|
# Allow for a package install to not use the vendored urllib3
|
|
|
|
UPSTREAM_URLLIB3_FLAG = '--with-upstream-urllib3'
|
|
|
|
if UPSTREAM_URLLIB3_FLAG in sys.argv:
|
|
|
|
sys.argv.remove(UPSTREAM_URLLIB3_FLAG)
|
|
|
|
requirements.append('urllib3 >= 1.19.1')
|
|
|
|
packages = [x for x in packages if not x.startswith('telegram.vendor.ptb_urllib3')]
|
2017-03-11 15:51:20 +01:00
|
|
|
|
2016-05-25 00:43:16 +02:00
|
|
|
with codecs.open('README.rst', 'r', 'utf-8') as fd:
|
2016-08-11 14:38:55 +02:00
|
|
|
fn = os.path.join('telegram', 'version.py')
|
|
|
|
with open(fn) as fh:
|
|
|
|
code = compile(fh.read(), fn, 'exec')
|
|
|
|
exec(code)
|
2016-07-29 17:40:11 +02:00
|
|
|
|
2016-05-25 00:43:16 +02:00
|
|
|
setup(name='python-telegram-bot',
|
2016-07-29 17:40:11 +02:00
|
|
|
version=__version__,
|
2016-05-25 00:43:16 +02:00
|
|
|
author='Leandro Toledo',
|
|
|
|
author_email='devs@python-telegram-bot.org',
|
|
|
|
license='LGPLv3',
|
2016-09-24 15:29:23 +02:00
|
|
|
url='https://python-telegram-bot.org/',
|
2016-05-25 00:43:16 +02:00
|
|
|
keywords='python telegram bot api wrapper',
|
2016-12-11 23:51:51 +01:00
|
|
|
description="We have made you a wrapper you can't refuse",
|
2016-05-25 00:43:16 +02:00
|
|
|
long_description=fd.read(),
|
2017-03-11 15:51:20 +01:00
|
|
|
packages=packages,
|
2020-11-01 19:33:01 +01:00
|
|
|
package_data={'telegram': ['py.typed']},
|
2020-02-02 21:56:25 +01:00
|
|
|
install_requires=requirements,
|
2016-08-26 10:23:17 +02:00
|
|
|
extras_require={
|
|
|
|
'json': 'ujson',
|
2017-02-25 19:47:56 +01:00
|
|
|
'socks': 'PySocks'
|
2016-08-26 10:23:17 +02:00
|
|
|
},
|
2016-05-25 00:43:16 +02:00
|
|
|
include_package_data=True,
|
|
|
|
classifiers=[
|
|
|
|
'Development Status :: 5 - Production/Stable',
|
|
|
|
'Intended Audience :: Developers',
|
|
|
|
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
|
|
|
|
'Operating System :: OS Independent',
|
|
|
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
|
|
|
'Topic :: Communications :: Chat',
|
|
|
|
'Topic :: Internet',
|
|
|
|
'Programming Language :: Python',
|
|
|
|
'Programming Language :: Python :: 3',
|
2018-12-04 15:06:22 +01:00
|
|
|
'Programming Language :: Python :: 3.6',
|
2020-03-11 22:36:34 +01:00
|
|
|
'Programming Language :: Python :: 3.7',
|
|
|
|
'Programming Language :: Python :: 3.8',
|
2020-10-11 11:47:19 +02:00
|
|
|
'Programming Language :: Python :: 3.9',
|
2016-05-25 00:43:16 +02:00
|
|
|
],)
|