media-sound/beets: add 2.10.0

* Drop doc use flag. Requires sphinx-toolbox which uses a NIH buildsystem
  that expands into a >20 package size depgraph of other NIH dependencies.
* Exclude failing test.

Bug: https://bugs.gentoo.org/958176
Closes: https://bugs.gentoo.org/969294
Closes: https://bugs.gentoo.org/974004
Signed-off-by: Alfred Wingate <parona@protonmail.com>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/743
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Alfred Wingate
2026-05-18 22:21:13 +01:00
committed by Sam James
parent e04b7901ed
commit 73d19bca90
3 changed files with 211 additions and 37 deletions
+2
View File
@@ -1,3 +1,5 @@
DIST beets-1.7.0_pre20240501.gh.tar.gz 2247319 BLAKE2B e215c8a2a30a44d298746351be4fa2de1cebb7d6aec2bc7dfc679b133ea5eddefec20d038aa1aa1d734b176c09163b93f917c6c29ea5115c4c2349e090c8c5df SHA512 f397c72b481d7d8822db598ab37c99d0b9063ae45455c0d34116fab7b5a4cc683a3357bdfe436181b1dea46ee05192cc37faf355b5e093d63c2e440e523b92bc
DIST beets-2.10.0.tar.gz 2282966 BLAKE2B 7e5819f1857d48a32581e854a7e4095afc28c2cb446a5f1fca6a3621d7443005ba901a753340cd2035cc8e2bcf176323b268fe0b903563d4983b8d9a9e0ee05d SHA512 9a34720f7d851b769f74bf573d8a8d8324f443b20dd6ec5c91f18457144a9ab5a912cb24d58a1da4d50ba3438f1a58f7763cb7268f1db134195369b07064e5d6
DIST beets-2.10.0.tar.gz.provenance 9362 BLAKE2B b5a0eb9fd1a9da6d51218aed9003018e4f32c7cc9ef005f9775417b10bc3961c1374691cb7511b1c4a25602c971531e2a5c8ca5bdd0728e10c58d37b513197df SHA512 34f83916b45d2c97af64b4a0f46b4e33509d2a055c112daee627a2c44ab8d3e49df0149b36a06e3bdf5674cd3bfa19f167cabf70c29400cde22638c55653bb00
DIST beets-2.3.1.tar.gz 2133246 BLAKE2B 1c5eb7ab0029683448bf996c82579f780940752146fa40a764cd3d353b7894226a4c7f8ae3c7ecca58c25dc1f2f8d44f0d66053f037c332f65396d0d90aa9754 SHA512 b065dd9f1ce5dd63779b085d44510e5158d23046fdc9ecaa1ce9a10d5f8fa660e1ad130c68fed4ddac323453fcbf6d1ea2dc2a9897931c486da099b87dcfc047
DIST beets-2.3.1.tar.gz.provenance 9322 BLAKE2B ce059df773672f050ef9c3e0dee65313ce064190a8d3a8b0448947a2a288433cc5eff7cddae1d0c295f9067ac3efedaaac9a4a01e925ea22202b925e1f446186 SHA512 39ee130a52bac880d4565200a61a85cb7b2b3169841e66318fa392a6302ef1f5bed2be7cac0aaec8172a34747a88a52f9032f28c8144346e2cac80c33fb900c8
+172
View File
@@ -0,0 +1,172 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_SINGLE_IMPL=1
DISTUTILS_USE_PEP517=poetry
PYTHON_COMPAT=( python3_{12..14} )
PYTHON_REQ_USE="sqlite"
# These envvars are used to treat github tarball builds differently
# from pypi sources. Enable where required
: ${IS_VCS_SOURCE="no"}
: ${UPDATE_VERSION="no"}
inherit distutils-r1 optfeature shell-completion
if [[ ${PV} == "9999" ]]; then
EGIT_REPO_URI="https://github.com/beetbox/beets.git"
IS_VCS_SOURCE="yes"
UPDATE_VERSION="yes"
inherit git-r3
else
PYPI_VERIFY_REPO=https://github.com/beetbox/beets
inherit pypi
MY_PV=${PV/_beta/-beta.}
MY_P=${PN}-${MY_PV}
KEYWORDS="~amd64"
S="${WORKDIR}/${MY_P}"
fi
DESCRIPTION="Media library management system for obsessive music geeks"
HOMEPAGE="https://beets.io/ https://pypi.org/project/beets/"
LICENSE="MIT"
SLOT="0"
# TODO: test-full with GITHUB_ACTIONS=true. Would require packaging more dependencies.
RDEPEND="
$(python_gen_cond_dep '
>=dev-python/jellyfish-0.7.1[${PYTHON_USEDEP}]
>=media-libs/mutagen-1.33[${PYTHON_USEDEP}]
>=dev-python/confuse-2.2.0[${PYTHON_USEDEP}]
>=dev-python/lap-0.5.12[${PYTHON_USEDEP}]
>=dev-python/mediafile-0.16.2[${PYTHON_USEDEP}]
>=dev-python/numpy-2[${PYTHON_USEDEP}]
>=dev-python/packaging-24.0[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
dev-python/reflink[${PYTHON_USEDEP}]
>=dev-python/requests-ratelimiter-0.7.0[${PYTHON_USEDEP}]
>=dev-python/requests-2.32.5[${PYTHON_USEDEP}]
dev-python/typing-extensions[${PYTHON_USEDEP}]
>=dev-python/unidecode-1.3.6[${PYTHON_USEDEP}]
')
"
BDEPEND="
$(python_gen_cond_dep '
test? (
dev-db/sqlite[icu]
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
dev-python/bluelet[${PYTHON_USEDEP}]
dev-python/dbus-python[${PYTHON_USEDEP}]
dev-python/python3-discogs-client[${PYTHON_USEDEP}]
dev-python/flask[${PYTHON_USEDEP}]
dev-python/mock[${PYTHON_USEDEP}]
dev-python/pyacoustid[${PYTHON_USEDEP}]
dev-python/pylast[${PYTHON_USEDEP}]
dev-python/pygobject:3[${PYTHON_USEDEP}]
dev-python/python-mpd2[${PYTHON_USEDEP}]
dev-python/pyxdg[${PYTHON_USEDEP}]
dev-python/reflink[${PYTHON_USEDEP}]
|| (
dev-python/pillow[${PYTHON_USEDEP}]
media-gfx/imagemagick
)
dev-python/rarfile[${PYTHON_USEDEP}]
dev-python/requests-mock[${PYTHON_USEDEP}]
dev-python/responses[${PYTHON_USEDEP}]
dev-python/wheel[${PYTHON_USEDEP}]
media-libs/chromaprint[tools]
media-libs/flac
media-libs/gst-plugins-bad:1.0
media-libs/gst-plugins-good:1.0
media-sound/mp3val
media-sound/mp3gain
media-plugins/gst-plugins-libav:1.0
media-video/ffmpeg[encode(+)]
app-shells/bash-completion
)
')
"
# Beets uses sphinx to generate manpages; these are not available
# directly in VCS sources, only pypi tarballs, so handle the dependency
# here automagically.
if [[ ${PV} == "9999" ]] || [[ ${IS_VCS_SOURCE} == "yes" ]]; then
BDEPEND+=" $(python_gen_cond_dep 'dev-python/sphinx[${PYTHON_USEDEP}]')"
fi
DOCS=( README.rst docs/changelog.rst )
EPYTEST_PLUGINS=( pytest-flask )
EPYTEST_IGNORE=(
# Not relevant downstream
test/test_release.py
# Unpackaged test dependencies: titlecase and pytest-factoryboy
# (These tests aren't included in the sdist)
test/plugins
)
EPYTEST_XDIST=1
distutils_enable_tests pytest
python_prepare_all() {
distutils-r1_python_prepare_all
if [[ ${PV} == "9999" ]] || [[ ${UPDATE_VERSION} == "yes" ]]; then
sed -i -e "s/^version = \".*\"$/version = \"${PV}\"/" \
pyproject.toml \
|| die "Failed to update version in VCS sources"
sed -i -e "s/__version__ = \".*\"/__version__ = \"${PV}\"/" beets/__init__.py
fi
# Don't require extra unpackaged sphinx dependencies to generate man pages on live
sed -e '/sphinx_design/d' \
-e '/sphinx_copybutton/d' \
-e '/sphinx_toolbox/d' \
-i docs/conf.py || die
}
python_compile_all() {
# If building from VCS sources we need to generate manpages, then copy them to ${S}/man
# We could install mans from the sphinx build path, but to be consistent with pypi for src_install
# we'll instead generate them and copy to the same install location if building from VCS sources.
if [[ ${PV} == "9999" ]] || [[ ${IS_VCS_SOURCE} == "yes" ]]; then
einfo "Building man pages"
sphinx-build -b man docs docs/build/man || die "Failed to generate man pages"
mkdir "${S}/man" || die
cp docs/build/man/{beet.1,beetsconfig.5} "${S}/man" || die
fi
}
python_install_all() {
distutils-r1_python_install_all
# remove leftover file in sdist
if [[ -e man/_sphinx_design_static ]]; then
rm -rf man/_sphinx_design_static || die
fi
doman man/*
einstalldocs
# Generate the bash completions; we'll set PYTHONPATH for this invocation so that beets can start.
PYTHONPATH="${ED}/usr/lib/${PYTHON}:$PYTHONPATH" ${PYTHON} "${ED}/usr/bin/beet" completion > "${T}/beet.bash" || die
newbashcomp "${T}/beet.bash" beet
newzshcomp "${S}/extra/_beet" _beet
optfeature "badfiles support" "media-libs/flac media-sound/mp3val"
optfeature "chromaprint support" "dev-python/pyacoustid media-libs/chromaprint[tools]"
optfeature "discogs support" dev-python/python3-discogs-client
optfeature "ffmpeg support" media-video/ffmpeg
optfeature "gstreamer support" "media-libs/gst-plugins-bad media-libs/gst-plugins-good"
optfeature "icu support" dev-db/sqlite[icu]
optfeature "lastfm support" dev-python/pylast
optfeature "mpd support" "dev-python/bluelet dev-python/python-mpd2"
optfeature "replaygain with gstreamer support" "dev-python/pygobject media-plugins/gst-plugins-libav"
optfeature "replaygain without gstreamer support" media-sound/mp3gain
optfeature "thumbnail support" dev-python/pyxdg "dev-python/pillow media-gfx/imagemagick"
optfeature "webserver support" dev-python/flask
optfeature "webserver cors support" dev-python/flask-cors
optfeature "Amarok metadata synchronisation" dev-python/dbus-python
}
+37 -37
View File
@@ -5,7 +5,7 @@ EAPI=8
DISTUTILS_SINGLE_IMPL=1
DISTUTILS_USE_PEP517=poetry
PYTHON_COMPAT=( python3_{12..13} )
PYTHON_COMPAT=( python3_{12..14} )
PYTHON_REQ_USE="sqlite"
# These envvars are used to treat github tarball builds differently
@@ -13,7 +13,7 @@ PYTHON_REQ_USE="sqlite"
: ${IS_VCS_SOURCE="no"}
: ${UPDATE_VERSION="no"}
inherit distutils-r1 multiprocessing optfeature shell-completion
inherit distutils-r1 optfeature shell-completion
if [[ ${PV} == "9999" ]]; then
EGIT_REPO_URI="https://github.com/beetbox/beets.git"
@@ -21,6 +21,7 @@ if [[ ${PV} == "9999" ]]; then
UPDATE_VERSION="yes"
inherit git-r3
else
PYPI_VERIFY_REPO=https://github.com/beetbox/beets
inherit pypi
MY_PV=${PV/_beta/-beta.}
MY_P=${PN}-${MY_PV}
@@ -33,33 +34,27 @@ HOMEPAGE="https://beets.io/ https://pypi.org/project/beets/"
LICENSE="MIT"
SLOT="0"
IUSE="doc test"
RESTRICT="!test? ( test )"
# TODO: test-full with GITHUB_ACTIONS=true. Would require packaging more dependencies.
RDEPEND="
$(python_gen_cond_dep '
>=dev-python/jellyfish-0.7.1[${PYTHON_USEDEP}]
>=media-libs/mutagen-1.33[${PYTHON_USEDEP}]
>=dev-python/musicbrainzngs-0.4[${PYTHON_USEDEP}]
dev-python/confuse[${PYTHON_USEDEP}]
>=dev-python/confuse-2.2.0[${PYTHON_USEDEP}]
>=dev-python/lap-0.5.12[${PYTHON_USEDEP}]
dev-python/mediafile[${PYTHON_USEDEP}]
>=dev-python/numpy-1.24.4[${PYTHON_USEDEP}]
>=dev-python/mediafile-0.16.2[${PYTHON_USEDEP}]
>=dev-python/numpy-2[${PYTHON_USEDEP}]
>=dev-python/packaging-24.0[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
dev-python/reflink[${PYTHON_USEDEP}]
dev-python/requests-oauthlib[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
>=dev-python/requests-ratelimiter-0.7.0[${PYTHON_USEDEP}]
>=dev-python/requests-2.32.5[${PYTHON_USEDEP}]
dev-python/typing-extensions[${PYTHON_USEDEP}]
dev-python/unidecode[${PYTHON_USEDEP}]
')"
DEPEND="
${RDEPEND}
>=dev-python/unidecode-1.3.6[${PYTHON_USEDEP}]
')
"
BDEPEND="
doc? (
dev-python/sphinx
dev-python/pydata-sphinx-theme
)
$(python_gen_cond_dep '
test? (
dev-db/sqlite[icu]
@@ -72,7 +67,6 @@ BDEPEND="
dev-python/pyacoustid[${PYTHON_USEDEP}]
dev-python/pylast[${PYTHON_USEDEP}]
dev-python/pygobject:3[${PYTHON_USEDEP}]
dev-python/pytest-flask[${PYTHON_USEDEP}]
dev-python/python-mpd2[${PYTHON_USEDEP}]
dev-python/pyxdg[${PYTHON_USEDEP}]
dev-python/reflink[${PYTHON_USEDEP}]
@@ -94,40 +88,47 @@ BDEPEND="
media-video/ffmpeg[encode(+)]
app-shells/bash-completion
)
')"
')
"
# Beets uses sphinx to generate manpages; these are not available
# directly in VCS sources, only pypi tarballs, so handle the dependency
# here automagically.
if [[ ${PV} == "9999" ]] || [[ ${IS_VCS_SOURCE} == "yes" ]]; then
BDEPEND+="
dev-python/sphinx
"
BDEPEND+=" $(python_gen_cond_dep 'dev-python/sphinx[${PYTHON_USEDEP}]')"
fi
DOCS=( README.rst docs/changelog.rst )
EPYTEST_PLUGINS=( pytest-flask )
EPYTEST_IGNORE=(
# Not relevant downstream
test/test_release.py
# Unpackaged test dependencies: titlecase and pytest-factoryboy
# (These tests aren't included in the sdist)
test/plugins
)
EPYTEST_XDIST=1
distutils_enable_tests pytest
src_prepare() {
python_prepare_all() {
distutils-r1_python_prepare_all
if [[ ${PV} == "9999" ]] || [[ ${UPDATE_VERSION} == "yes" ]]; then
sed -i -e "s/^version = \".*\"$/version = \"${PV}\"/" \
pyproject.toml \
|| die "Failed to update version in VCS sources"
sed -i -e "s/__version__ = \".*\"/__version__ = \"${PV}\"/" beets/__init__.py
fi
default
}
python_prepare_all() {
distutils-r1_python_prepare_all
# Don't require extra unpackaged sphinx dependencies to generate man pages on live
sed -e '/sphinx_design/d' \
-e '/sphinx_copybutton/d' \
-e '/sphinx_toolbox/d' \
-i docs/conf.py || die
}
python_compile_all() {
if use doc ; then
sphinx-build -b html docs docs/build/html || die
fi
# If building from VCS sources we need to generate manpages, then copy them to ${S}/man
# We could install mans from the sphinx build path, but to be consistent with pypi for src_install
# we'll instead generate them and copy to the same install location if building from VCS sources.
@@ -139,17 +140,16 @@ python_compile_all() {
fi
}
python_test() {
# test/test_art_resize.py can be flaky, parallelisation?
epytest -n$(makeopts_jobs) -v
}
python_install_all() {
distutils-r1_python_install_all
# remove leftover file in sdist
if [[ -e man/_sphinx_design_static ]]; then
rm -rf man/_sphinx_design_static || die
fi
doman man/*
use doc && local HTML_DOCS=( docs/build/html/. )
einstalldocs
# Generate the bash completions; we'll set PYTHONPATH for this invocation so that beets can start.
PYTHONPATH="${ED}/usr/lib/${PYTHON}:$PYTHONPATH" ${PYTHON} "${ED}/usr/bin/beet" completion > "${T}/beet.bash" || die
newbashcomp "${T}/beet.bash" beet