Configure pyproject.toml

This commit is contained in:
Šarūnas Nejus 2024-05-13 06:44:55 +01:00
parent 0966e3c653
commit 614ba1d3d6
No known key found for this signature in database
GPG key ID: DD28F6704DBE3435
3 changed files with 2756 additions and 190 deletions

2615
poetry.lock generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,144 @@
[tool.poetry]
name = "beets"
version = "2.0.0"
description = "music tagger and library organizer"
authors = ["Adrian Sampson <adrian@radbox.org>"]
maintainers = ["Serene-Arc"]
license = "MIT"
readme = "README.rst"
homepage = "https://beets.io/"
repository = "https://github.com/beetbox/beets"
documentation = "https://beets.readthedocs.io/en/stable/"
classifiers = [
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Sound/Audio :: Players :: MP3",
"License :: OSI Approved :: MIT License",
"Environment :: Console",
"Environment :: Web Environment",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
]
packages = [
{ include = "beets" },
{ include = "beetsplug" },
]
[tool.poetry.urls]
Changelog = "https://github.com/beetbox/beets/blob/master/docs/changelog.rst"
"Bug Tracker" = "https://github.com/beetbox/beets/issues"
[tool.poetry.dependencies]
python = ">=3.8,<4"
click = ">=8.1.7"
colorama = { version = "*", markers = "sys_platform == 'win32'" }
confuse = ">=1.5.0"
jellyfish = "*"
mediafile = ">=0.12.0"
munkres = ">=1.0.0"
musicbrainzngs = ">=0.4"
packaging = ">=24.0"
pyyaml = "*"
tomli = ">=2.0.1"
typing_extensions = "*"
unidecode = ">=1.3.6"
beautifulsoup4 = { version = "*", optional = true }
dbus-python = { version = "*", optional = true }
flask = { version = "*", optional = true }
flask-cors = { version = "*", optional = true }
langdetect = { version = "*", optional = true }
mutagen = { version = ">=1.33", optional = true }
Pillow = { version = "*", optional = true }
py7zr = { version = "*", optional = true }
pyacoustid = { version = "*", optional = true }
PyGObject = { version = "*", optional = true }
pylast = { version = "*", optional = true }
python-mpd2 = { version = ">=0.4.2", optional = true }
python3-discogs-client = { version = ">=2.3.15", optional = true }
pyxdg = { version = "*", optional = true }
rarfile = { version = "*", optional = true }
reflink = { version = "*", optional = true }
requests = { version = "*", optional = true }
requests-oauthlib = { version = ">=0.6.1", optional = true }
soco = { version = "*", optional = true }
[tool.poetry.group.test.dependencies]
beautifulsoup4 = "*"
flask = "*"
mock = "*"
pylast = "*"
pytest = "*"
pytest-cov = "*"
pytest-flask = "*"
python-mpd2 = "*"
python3-discogs-client = ">=2.3.15"
py7zr = "*"
pyxdg = "*"
rarfile = "*"
reflink = "*"
requests_oauthlib = "*"
responses = ">=0.3.0"
[tool.poetry.group.lint.dependencies]
flake8 = "*"
flake8-docstrings = "*"
pep8-naming = "*"
[tool.poetry.group.typing.dependencies]
mypy = "*"
types-beautifulsoup4 = "*"
types-Flask-Cors = "*"
types-Pillow = "*"
types-PyYAML = "*"
types-requests = "*"
types-urllib3 = "*"
[tool.poetry.group.docs.dependencies]
pydata-sphinx-theme = "*"
sphinx = "*"
[tool.poetry.extras]
# inline comments note required external / non-python dependencies
absubmit = ["requests"] # extractor binary from https://acousticbrainz.org/download
# badfiles # mp3val and flac
beatport = ["requests-oauthlib"]
bpd = ["PyGObject"] # python-gi and GStreamer 1.0+
chroma = ["pyacoustid"] # chromaprint or fpcalc
# convert # ffmpeg
discogs = ["python3-discogs-client"]
embedart = ["Pillow"] # ImageMagick
embyupdate = ["requests"]
fetchart = ["beautifulsoup4", "Pillow", "requests"]
import = ["py7zr", "rarfile"]
# ipfs # go-ipfs
# keyfinder # KeyFinder
kodiupdate = ["requests"]
lastgenre = ["pylast"]
lastimport = ["pylast"]
lyrics = ["beautifulsoup4", "langdetect", "requests"]
metasync = ["dbus-python"]
mpdstats = ["python-mpd2"]
plexupdate = ["requests"]
reflink = ["reflink"]
replaygain = [
"PyGObject",
] # python-gi and GStreamer 1.0+ or mp3gain/aacgain or Python Audio Tools or ffmpeg
scrub = ["mutagen"]
sonosupdate = ["soco"]
thumbnails = ["Pillow", "pyxdg"]
web = ["flask", "flask-cors"]
[tool.poetry.scripts]
beet = "beets.ui:main"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
[tool.black]
line-length = 80
target-version = ["py38", "py39", "py310", "py311"]
@ -8,4 +149,3 @@ py_version = 38
multi_line_output = 3
line_length = 80
indent = 4

189
setup.py
View file

@ -1,189 +0,0 @@
#!/usr/bin/env python
# This file is part of beets.
# Copyright 2016, Adrian Sampson.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
import os
import shutil
import subprocess
import sys
from setuptools import setup
def _read(fn):
path = os.path.join(os.path.dirname(__file__), fn)
return open(path).read()
def build_manpages():
# Go into the docs directory and build the manpage.
docdir = os.path.join(os.path.dirname(__file__), "docs")
curdir = os.getcwd()
os.chdir(docdir)
try:
subprocess.check_call(["make", "man"])
except OSError:
print("Could not build manpages (make man failed)!", file=sys.stderr)
return
finally:
os.chdir(curdir)
# Copy resulting manpages.
mandir = os.path.join(os.path.dirname(__file__), "man")
if os.path.exists(mandir):
shutil.rmtree(mandir)
shutil.copytree(os.path.join(docdir, "_build", "man"), mandir)
# Build manpages if we're making a source distribution tarball.
if "sdist" in sys.argv:
build_manpages()
setup(
name="beets",
version="2.0.0",
description="music tagger and library organizer",
author="Adrian Sampson",
author_email="adrian@radbox.org",
url="https://beets.io/",
license="MIT",
platforms="ALL",
long_description=_read("README.rst"),
test_suite="test.testall.suite",
zip_safe=False,
include_package_data=True, # Install plugin resources.
packages=[
"beets",
"beets.autotag",
"beets.dbcore",
"beets.test",
"beets.ui",
"beets.util",
"beetsplug",
"beetsplug.bpd",
"beetsplug.lastgenre",
"beetsplug.metasync",
"beetsplug.web",
],
entry_points={
"console_scripts": [
"beet = beets.ui:main",
],
},
install_requires=[
"confuse>=1.5.0",
"jellyfish",
"mediafile>=0.12.0",
"munkres>=1.0.0",
"musicbrainzngs>=0.4",
"pyyaml",
"typing_extensions",
"unidecode>=1.3.6",
]
+ (
# Support for ANSI console colors on Windows.
["colorama"]
if (sys.platform == "win32")
else []
),
extras_require={
"test": [
"beautifulsoup4",
"flask",
"mock",
"pylast",
"pytest",
"pytest-cov",
"pytest-flask",
"python-mpd2",
"python3-discogs-client>=2.3.15",
"py7zr",
"pyxdg",
"rarfile",
"reflink",
"requests_oauthlib",
"responses>=0.3.0",
],
"lint": [
"flake8",
"flake8-docstrings",
"pep8-naming",
],
"mypy": [
"mypy",
"types-beautifulsoup4",
"types-Flask-Cors",
"types-Pillow",
"types-PyYAML",
"types-requests",
"types-urllib3",
],
"docs": [
"pydata_sphinx_theme",
"sphinx",
],
# Plugin (optional) dependencies:
"absubmit": ["requests"],
"beatport": ["requests-oauthlib>=0.6.1"],
"bpd": ["PyGObject"],
"chroma": ["pyacoustid"],
"discogs": ["python3-discogs-client>=2.3.15"],
"embedart": ["Pillow"],
"embyupdate": ["requests"],
"fetchart": ["requests", "Pillow", "beautifulsoup4"],
"import": ["rarfile", "py7zr"],
"kodiupdate": ["requests"],
"lastgenre": ["pylast"],
"lastimport": ["pylast"],
"lyrics": ["requests", "beautifulsoup4", "langdetect"],
"metasync": ["dbus-python"],
"mpdstats": ["python-mpd2>=0.4.2"],
"plexupdate": ["requests"],
"reflink": ["reflink"],
"replaygain": ["PyGObject"],
"scrub": ["mutagen>=1.33"],
"sonosupdate": ["soco"],
"thumbnails": ["pyxdg", "Pillow"],
"web": ["flask", "flask-cors"],
},
# Non-Python/non-PyPI plugin dependencies:
# chroma: chromaprint or fpcalc
# convert: ffmpeg
# badfiles: mp3val and flac
# bpd: python-gi and GStreamer 1.0+
# embedart: ImageMagick
# absubmit: extractor binary from https://acousticbrainz.org/download
# keyfinder: KeyFinder
# replaygain: python-gi and GStreamer 1.0+
# or mp3gain/aacgain
# or Python Audio Tools
# or ffmpeg
# ipfs: go-ipfs
classifiers=[
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Sound/Audio :: Players :: MP3",
"License :: OSI Approved :: MIT License",
"Environment :: Console",
"Environment :: Web Environment",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
],
)