2017-09-12 00:29:04 +03:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
2017-05-19 19:11:42 +03:00
|
|
|
from distutils.core import setup
|
|
|
|
|
|
2018-01-27 09:54:19 +02:00
|
|
|
from pip.req import parse_requirements
|
2017-05-19 19:11:42 +03:00
|
|
|
from setuptools import PackageFinder
|
|
|
|
|
|
2018-01-27 09:54:19 +02:00
|
|
|
from aiogram import Stage, VERSION
|
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
|
|
|
|
|
"""
|
2018-01-27 09:54:19 +02:00
|
|
|
with open('README.rst', 'r', encoding='utf-8') as f:
|
2017-05-19 19:11:42 +03:00
|
|
|
return f.read()
|
|
|
|
|
|
|
|
|
|
|
2017-09-12 00:29:04 +03:00
|
|
|
def get_requirements():
|
|
|
|
|
"""
|
|
|
|
|
Read requirements from 'requirements txt'
|
|
|
|
|
|
|
|
|
|
:return: requirements
|
|
|
|
|
:rtype: list
|
|
|
|
|
"""
|
2018-01-27 09:54:19 +02:00
|
|
|
filename = 'requirements.txt'
|
|
|
|
|
if VERSION.stage == Stage.DEV:
|
|
|
|
|
filename = 'dev_' + filename
|
2017-09-12 00:29:04 +03:00
|
|
|
|
2018-01-27 09:54:19 +02:00
|
|
|
install_reqs = parse_requirements(filename, session='hack')
|
|
|
|
|
return [str(ir.req) for ir in install_reqs]
|
2017-09-12 00:29:04 +03:00
|
|
|
|
|
|
|
|
|
2018-01-27 09:54:19 +02:00
|
|
|
install_requires = get_requirements()
|
|
|
|
|
|
2017-05-19 19:11:42 +03:00
|
|
|
setup(
|
|
|
|
|
name='aiogram',
|
2017-09-16 20:29:34 +03:00
|
|
|
version=VERSION.version,
|
2018-01-27 22:44:46 +02:00
|
|
|
packages=PackageFinder.find(exclude=('tests', 'tests.*', 'examples.*', 'docs',)),
|
2017-11-19 00:39:25 +02:00
|
|
|
url='https://github.com/aiogram/aiogram',
|
2017-05-19 19:11:42 +03:00
|
|
|
license='MIT',
|
|
|
|
|
author='Alex Root Junior',
|
|
|
|
|
author_email='jroot.junior@gmail.com',
|
2018-01-23 17:02:52 +03:00
|
|
|
description='Is a pretty simple and fully asynchronous library for Telegram Bot API',
|
2017-05-19 19:11:42 +03:00
|
|
|
long_description=get_description(),
|
|
|
|
|
classifiers=[
|
2017-09-16 20:29:34 +03:00
|
|
|
VERSION.pypi_development_status, # Automated change classifier by build stage
|
2017-05-19 19:11:42 +03:00
|
|
|
'Environment :: Console',
|
|
|
|
|
'Framework :: AsyncIO',
|
2018-01-27 09:54:19 +02:00
|
|
|
'Intended Audience :: Developers',
|
|
|
|
|
'Intended Audience :: System Administrators',
|
2017-05-19 19:11:42 +03:00
|
|
|
'License :: OSI Approved :: MIT License',
|
2018-01-27 09:54:19 +02:00
|
|
|
'Programming Language :: Python :: 3.6',
|
|
|
|
|
'Topic :: Software Development :: Libraries :: Application Frameworks',
|
2017-05-19 19:11:42 +03:00
|
|
|
],
|
2018-01-27 09:54:19 +02:00
|
|
|
install_requires=install_requires
|
2017-05-19 19:11:42 +03:00
|
|
|
)
|