aiogram/setup.py

78 lines
2.1 KiB
Python
Raw Normal View History

2017-09-12 00:29:04 +03:00
#!/usr/bin/env python3
import pathlib
import re
2018-02-22 02:11:29 +02:00
import sys
2017-05-19 19:11:42 +03:00
from setuptools import find_packages, setup
WORK_DIR = pathlib.Path(__file__).parent
2017-05-19 19:11:42 +03:00
# Check python version
2018-06-23 17:39:24 +03:00
MINIMAL_PY_VERSION = (3, 7)
2018-02-22 02:11:29 +02:00
if sys.version_info < MINIMAL_PY_VERSION:
raise RuntimeError('aiogram works only with Python {}+'.format('.'.join(map(str, MINIMAL_PY_VERSION))))
def get_version():
"""
Read version
:return: str
"""
txt = (WORK_DIR / 'aiogram' / '__init__.py').read_text('utf-8')
try:
return re.findall(r"^__version__ = '([^']+)'\r?$", txt, re.M)[0]
except IndexError:
raise RuntimeError('Unable to determine version.')
2018-02-22 02:11:29 +02:00
2017-05-19 19:11:42 +03:00
def get_description():
2017-09-12 00:29:04 +03:00
"""
Read full description from 'README.rst'
:return: description
:rtype: str
"""
with open('README.rst', 'r', encoding='utf-8') as f:
2017-05-19 19:11:42 +03:00
return f.read()
setup(
name='aiogram',
version=get_version(),
packages=find_packages(exclude=('tests', 'tests.*', 'examples.*', 'docs',)),
url='https://github.com/aiogram/aiogram',
2017-05-19 19:11:42 +03:00
license='MIT',
author='Alex Root Junior',
2018-06-23 17:39:24 +03:00
requires_python='>=3.7',
2018-09-07 21:24:13 +03:00
author_email='jroot.junior@gmail.com',
2019-10-14 16:06:35 +03:00
description='Is a pretty simple and fully asynchronous framework for Telegram Bot API',
2017-05-19 19:11:42 +03:00
long_description=get_description(),
classifiers=[
2018-05-11 00:27:18 +03:00
'Development Status :: 5 - Production/Stable',
2017-05-19 19:11:42 +03:00
'Environment :: Console',
'Framework :: AsyncIO',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
2017-05-19 19:11:42 +03:00
'License :: OSI Approved :: MIT License',
2018-06-23 17:39:24 +03:00
'Programming Language :: Python :: 3.7',
2020-01-01 17:14:54 +02:00
'Programming Language :: Python :: 3.8',
'Topic :: Software Development :: Libraries :: Application Frameworks',
2017-05-19 19:11:42 +03:00
],
2020-01-01 17:14:54 +02:00
install_requires=[
'aiohttp>=3.5.4,<4.0.0',
'Babel>=2.6.0',
'certifi>=2019.3.9',
],
extras_require={
'proxy': [
2020-09-13 23:25:27 +03:00
'aiohttp-socks>=0.5.3,<0.6.0',
2020-01-01 17:14:54 +02:00
],
'fast': [
'uvloop>=0.14.0,<0.15.0',
'ujson>=1.35',
],
},
include_package_data=False,
2017-05-19 19:11:42 +03:00
)