2021-02-03 21:00:21 +09:00
|
|
|
import re
|
2020-01-31 06:06:13 +09:00
|
|
|
import sys
|
|
|
|
import json
|
|
|
|
|
2019-07-06 19:34:14 +09:00
|
|
|
from setuptools import setup, find_packages
|
2020-01-31 06:06:13 +09:00
|
|
|
from setuptools.command.test import test
|
2019-07-06 19:34:14 +09:00
|
|
|
|
|
|
|
|
2020-01-31 06:06:13 +09:00
|
|
|
class PyTest(test):
|
|
|
|
def run_tests(self):
|
|
|
|
import pytest
|
|
|
|
sys.exit(pytest.main(['tests']))
|
2019-07-06 19:34:14 +09:00
|
|
|
|
|
|
|
|
2020-01-31 06:06:13 +09:00
|
|
|
def requirements(section):
|
|
|
|
"""Создание листа зависимостей для этого проекта."""
|
|
|
|
with open('Pipfile.lock') as pip_file:
|
|
|
|
pipfile_json = json.load(pip_file)
|
|
|
|
|
|
|
|
return [package + detail.get('version', '')
|
|
|
|
for package, detail in pipfile_json[section].items()]
|
2019-07-06 19:34:14 +09:00
|
|
|
|
|
|
|
|
2020-01-31 06:06:13 +09:00
|
|
|
packages = find_packages()
|
2019-07-06 19:34:14 +09:00
|
|
|
|
2021-02-03 21:00:21 +09:00
|
|
|
with open('yandex_music/__init__.py', encoding='utf-8') as f:
|
|
|
|
version = re.findall(r"__version__ = '(.+)'", f.read())[0]
|
|
|
|
|
2019-07-06 19:34:14 +09:00
|
|
|
with open('README.rst', 'r', encoding='utf-8') as f:
|
2020-01-31 06:06:13 +09:00
|
|
|
readme = f.read()
|
|
|
|
|
|
|
|
with open('CHANGES.rst', 'r', encoding='utf-8') as f:
|
|
|
|
changes = f.read()
|
|
|
|
|
|
|
|
|
|
|
|
setup(name='yandex-music',
|
2021-02-03 21:00:21 +09:00
|
|
|
version=version,
|
2020-01-31 06:06:13 +09:00
|
|
|
author='Il`ya Semyonov',
|
2021-02-03 21:00:21 +09:00
|
|
|
author_email='ilya@marshal.dev',
|
2020-01-31 06:06:13 +09:00
|
|
|
license='LGPLv3',
|
|
|
|
url='https://github.com/MarshalX/yandex-music-api/',
|
2021-02-03 21:00:21 +09:00
|
|
|
keywords='python yandex music api wrapper library client питон пайтон '
|
|
|
|
'яндекс музыка апи обёртка библиотека клиент',
|
2020-01-31 06:06:13 +09:00
|
|
|
description='Делаю то, что по определённым причинам не сделала компания Yandex.',
|
|
|
|
long_description=f'{readme}\n{changes}',
|
|
|
|
packages=packages,
|
|
|
|
install_requires=requirements('default'),
|
|
|
|
include_package_data=True,
|
|
|
|
classifiers=[
|
2021-02-01 22:15:04 +09:00
|
|
|
'Development Status :: 5 - Production/Stable',
|
2020-01-31 06:06:13 +09:00
|
|
|
'Natural Language :: Russian',
|
|
|
|
'Intended Audience :: Developers',
|
|
|
|
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
|
|
|
|
'Operating System :: OS Independent',
|
|
|
|
'Topic :: Internet',
|
2021-02-03 21:00:21 +09:00
|
|
|
'Topic :: Multimedia :: Sound/Audio',
|
|
|
|
"Topic :: Software Development :: Libraries",
|
|
|
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
|
|
"Topic :: Software Development :: Libraries :: Application Frameworks",
|
2020-01-31 06:06:13 +09:00
|
|
|
'Programming Language :: Python',
|
|
|
|
'Programming Language :: Python :: 3.6',
|
|
|
|
'Programming Language :: Python :: 3.7',
|
2021-01-27 03:57:47 +09:00
|
|
|
'Programming Language :: Python :: 3.8',
|
2021-02-03 21:00:21 +09:00
|
|
|
'Programming Language :: Python :: 3.9',
|
|
|
|
"Programming Language :: Python :: Implementation",
|
|
|
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
|
|
"Programming Language :: Python :: Implementation :: PyPy"
|
2020-01-31 06:06:13 +09:00
|
|
|
],
|
2021-02-03 21:00:21 +09:00
|
|
|
python_requires="~=3.6",
|
2020-01-31 06:06:13 +09:00
|
|
|
cmdclass={'test': PyTest},
|
|
|
|
tests_require=requirements('develop'),
|
|
|
|
project_urls={
|
|
|
|
'Code': 'https://github.com/MarshalX/yandex-music-api',
|
|
|
|
'Documentation': 'https://yandex-music.readthedocs.io',
|
2021-02-01 22:15:04 +09:00
|
|
|
'Chat': 'https://t.me/yandex_music_api',
|
2020-01-31 06:06:13 +09:00
|
|
|
'Codecov': 'https://codecov.io/gh/MarshalX/yandex-music-api',
|
|
|
|
'Codacy': 'https://www.codacy.com/manual/MarshalX/yandex-music-api',
|
|
|
|
})
|