mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-09 09:22:03 +00:00
Update setup script and requirements list.
This commit is contained in:
parent
47a865aa5f
commit
e0e058e943
3 changed files with 26 additions and 31 deletions
28
setup.py
28
setup.py
|
|
@ -2,9 +2,10 @@
|
|||
|
||||
from distutils.core import setup
|
||||
|
||||
from pip.req import parse_requirements
|
||||
from setuptools import PackageFinder
|
||||
|
||||
from aiogram import VERSION
|
||||
from aiogram import Stage, VERSION
|
||||
|
||||
|
||||
def get_description():
|
||||
|
|
@ -14,7 +15,7 @@ def get_description():
|
|||
:return: description
|
||||
:rtype: str
|
||||
"""
|
||||
with open('README.rst', encoding='utf-8') as f:
|
||||
with open('README.rst', 'r', encoding='utf-8') as f:
|
||||
return f.read()
|
||||
|
||||
|
||||
|
|
@ -25,17 +26,16 @@ def get_requirements():
|
|||
:return: requirements
|
||||
:rtype: list
|
||||
"""
|
||||
requirements = []
|
||||
with open('requirements.txt', 'r') as file:
|
||||
for line in file.readlines():
|
||||
line = line.strip()
|
||||
if not line or line.startswith('#'):
|
||||
continue
|
||||
requirements.append(line)
|
||||
filename = 'requirements.txt'
|
||||
if VERSION.stage == Stage.DEV:
|
||||
filename = 'dev_' + filename
|
||||
|
||||
return requirements
|
||||
install_reqs = parse_requirements(filename, session='hack')
|
||||
return [str(ir.req) for ir in install_reqs]
|
||||
|
||||
|
||||
install_requires = get_requirements()
|
||||
|
||||
setup(
|
||||
name='aiogram',
|
||||
version=VERSION.version,
|
||||
|
|
@ -48,11 +48,13 @@ setup(
|
|||
long_description=get_description(),
|
||||
classifiers=[
|
||||
VERSION.pypi_development_status, # Automated change classifier by build stage
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Environment :: Console',
|
||||
'Framework :: AsyncIO',
|
||||
'Topic :: Software Development :: Libraries :: Application Frameworks',
|
||||
'Intended Audience :: Developers',
|
||||
'Intended Audience :: System Administrators',
|
||||
'License :: OSI Approved :: MIT License',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Topic :: Software Development :: Libraries :: Application Frameworks',
|
||||
],
|
||||
install_requires=get_requirements()
|
||||
install_requires=install_requires
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue