mirror of
https://github.com/mkb79/audible-cli.git
synced 2025-06-27 17:00:34 -04:00
* Update minimum Python version to 3.10 and dependencies Require Python 3.10+ instead of 3.6+ across `setup.py` and documentation. Updated supported Python versions, removed legacy `importlib-metadata` dependency, and adjusted Audible version requirement to v0.8.2 in the README. * Simplify asyncio handling and remove compatibility shims. Replaced custom asyncio loop handling with `asyncio.run` for consistency and simplicity. Removed backports and compatibility code for Python <3.10, assuming a minimum required Python version of 3.10. Replaced `asyncio.ensure_future` with `asyncio.create_task` for modern syntax compliance. * Remove Python 3.6 - 3.9 compatibility entry in changelog Updated the changelog to reflect the removal of compatibility with Python versions 3.6 through 3.9. This change ensures documentation is aligned with the latest supported environments.
78 lines
2.2 KiB
Python
78 lines
2.2 KiB
Python
import pathlib
|
|
import re
|
|
import sys
|
|
from os import system
|
|
from setuptools import setup, find_packages
|
|
|
|
|
|
# 'setup.py publish' shortcut.
|
|
if sys.argv[-1] == "publish":
|
|
system("python setup.py sdist bdist_wheel")
|
|
system("twine upload dist/*")
|
|
sys.exit()
|
|
|
|
if sys.version_info < (3, 10, 0):
|
|
raise RuntimeError("audible requires Python 3.10.0+")
|
|
|
|
here = pathlib.Path(__file__).parent
|
|
|
|
long_description = (here / "README.md").read_text("utf-8")
|
|
|
|
about = (here / "src" / "audible_cli" / "_version.py").read_text("utf-8")
|
|
|
|
|
|
def read_from_file(key):
|
|
return re.search(f"{key} = ['\"]([^'\"]+)['\"]", about).group(1)
|
|
|
|
|
|
setup(
|
|
name=read_from_file("__title__"),
|
|
version=read_from_file("__version__"),
|
|
packages=find_packages("src"),
|
|
package_dir={"": "src"},
|
|
include_package_data=True,
|
|
description=read_from_file("__description__"),
|
|
url=read_from_file("__url__"),
|
|
license=read_from_file("__license__"),
|
|
author=read_from_file("__author__"),
|
|
author_email=read_from_file("__author_email__"),
|
|
classifiers=[
|
|
"Development Status :: 4 - Beta",
|
|
"Intended Audience :: Developers",
|
|
"License :: OSI Approved :: GNU Affero General Public License v3",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: 3.13",
|
|
],
|
|
install_requires=[
|
|
"aiofiles",
|
|
"audible>=0.8.2",
|
|
"click>=8",
|
|
"colorama; platform_system=='Windows'",
|
|
"httpx>=0.23.3,<0.28.0",
|
|
"packaging",
|
|
"Pillow",
|
|
"tabulate",
|
|
"toml",
|
|
"tqdm",
|
|
"questionary",
|
|
],
|
|
extras_require={
|
|
'pyi': [
|
|
'pyinstaller'
|
|
]
|
|
},
|
|
python_requires=">=3.10",
|
|
keywords="Audible, API, async, cli",
|
|
long_description=long_description,
|
|
long_description_content_type="text/markdown",
|
|
project_urls={
|
|
"Documentation": "https://audiblecli.readthedocs.io/",
|
|
"Source": "https://github.com/mkb79/Audible-cli",
|
|
},
|
|
entry_points={
|
|
"console_scripts": ["audible = audible_cli:main",
|
|
"audible-quickstart = audible_cli:quickstart"]
|
|
}
|
|
)
|