From 722b76dee966ad9d4b5f54f0858c98260b08f5da Mon Sep 17 00:00:00 2001 From: grey-cat-1908 Date: Sat, 28 May 2022 17:45:08 +0300 Subject: [PATCH] setup.py --- melisa/__init__.py | 4 ++-- setup.py | 37 ++++++++++++++++++------------------- 2 files changed, 20 insertions(+), 21 deletions(-) diff --git a/melisa/__init__.py b/melisa/__init__.py index 5a17256..50b8f90 100644 --- a/melisa/__init__.py +++ b/melisa/__init__.py @@ -9,8 +9,8 @@ from .cache import CacheManager, AutoCacheModels __package__ = "melisa" __title__ = "Melisa" -__description__ = "Cache-configurable module to interact with the Discord API." +__description__ = "Cache-optimized Discord microframework for Python 3" __author__ = "MelisaDev" __license__ = "MIT" -__version__ = '0.0.1a0' +__version__ = '0.0.1.dev1' diff --git a/setup.py b/setup.py index 65db5f4..92863b5 100644 --- a/setup.py +++ b/setup.py @@ -3,26 +3,19 @@ import re from setuptools import setup -extras_require = [] -requirements = [] +def long_description(): + with open("README.md") as fp: + return fp.read() -with open('requirements.txt', encoding='utf-8') as file: - requirements = file.read().splitlines() -with open('speed-requirements.txt', encoding='utf-8') as file: - extras_require = file.read().splitlines() +def parse_requirements_file(path): + with open(path, encoding='utf-8') as file: + return file.read().splitlines() + with open('melisa/__init__.py', encoding='utf-8') as file: version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]', file.read(), re.MULTILINE).group(1) -if version is None: - raise RuntimeError('Version is not set!') - -readme = '' - -with open('README.md', encoding='utf-8') as file: - readme = file.read() - packages = [ 'melisa', @@ -38,18 +31,20 @@ packages = [ setup( name='melisa', - author='grey-cat, TheMisterSenpai', + author='MelisaDev', url='https://github.com/MelisaDev/melisa', version=version, packages=packages, license='MIT', description='Cache-optimized Discord microframework for Python 3', - long_description=readme, + long_description=long_description(), long_description_content_type="text/markdown", include_package_data=True, - python_requires='>=3.8', - install_requires=requirements, - extras_require=extras_require, + python_requires='>=3.8,<3.11', + install_requires=parse_requirements_file("requirements.txt"), + extras_require={ + "speedup": parse_requirements_file("packages/speed.txt") + }, classifiers=[ "Development Status :: 1 - Development", "License :: OSI Approved :: MIT License", @@ -59,8 +54,12 @@ setup( "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: Implementation :: CPython", + "Topic :: Communications :: Chat", + "Topic :: Internet :: WWW/HTTP", "Topic :: Internet", "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities", "Typing :: Typed",