aiogram/setup.py

61 lines
1.6 KiB
Python
Raw Normal View History

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
from pip.req import parse_requirements
2017-05-19 19:11:42 +03:00
from setuptools import PackageFinder
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
"""
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
"""
filename = 'requirements.txt'
if VERSION.stage == Stage.DEV:
filename = 'dev_' + filename
2017-09-12 00:29:04 +03: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
install_requires = get_requirements()
2017-05-19 19:11:42 +03:00
setup(
name='aiogram',
version=VERSION.version,
2018-01-27 22:44:46 +02:00
packages=PackageFinder.find(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',
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=[
VERSION.pypi_development_status, # Automated change classifier by build stage
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',
'Programming Language :: Python :: 3.6',
'Topic :: Software Development :: Libraries :: Application Frameworks',
2017-05-19 19:11:42 +03:00
],
install_requires=install_requires
2017-05-19 19:11:42 +03:00
)