commit: 64b615ca085133c79b7387cf68bde4d9c5b4ce1f Author: Alfred Wingate <parona <AT> protonmail <DOT> com> AuthorDate: Sat May 31 22:42:59 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sat May 31 23:53:12 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64b615ca
media-sound/beets: add 2.3.1 Bug: https://bugs.gentoo.org/952541 Signed-off-by: Alfred Wingate <parona <AT> protonmail.com> Part-of: https://github.com/gentoo/gentoo/pull/42378 Signed-off-by: Sam James <sam <AT> gentoo.org> media-sound/beets/Manifest | 1 + media-sound/beets/beets-2.3.1.ebuild | 172 +++++++++++++++++++++++++++++++++++ 2 files changed, 173 insertions(+) diff --git a/media-sound/beets/Manifest b/media-sound/beets/Manifest index e0b9bcf57b14..30d4064fd32f 100644 --- a/media-sound/beets/Manifest +++ b/media-sound/beets/Manifest @@ -1,2 +1,3 @@ DIST beets-1.7.0_pre20240501.gh.tar.gz 2247319 BLAKE2B e215c8a2a30a44d298746351be4fa2de1cebb7d6aec2bc7dfc679b133ea5eddefec20d038aa1aa1d734b176c09163b93f917c6c29ea5115c4c2349e090c8c5df SHA512 f397c72b481d7d8822db598ab37c99d0b9063ae45455c0d34116fab7b5a4cc683a3357bdfe436181b1dea46ee05192cc37faf355b5e093d63c2e440e523b92bc DIST beets-2.2.0.gh.tar.gz 2414560 BLAKE2B 24c68b27c0d35afb26a39505810ba8ae224173c6f0e36ca551f32cb78250a6b0e777a603c47fd18b6d7e6cdecc5fcaa6b64fe4fd33379de8d6b545dbd49f369f SHA512 ff3a2ea7820129f4b793766ac7dbe3bcfb353563ed3b64ada47db3ba64930caa5841f6cbd20e97e58a4a9eb340bc9e8cd90c7fc188f11420a3cb680ea7a25e48 +DIST beets-2.3.1.tar.gz 2133246 BLAKE2B 1c5eb7ab0029683448bf996c82579f780940752146fa40a764cd3d353b7894226a4c7f8ae3c7ecca58c25dc1f2f8d44f0d66053f037c332f65396d0d90aa9754 SHA512 b065dd9f1ce5dd63779b085d44510e5158d23046fdc9ecaa1ce9a10d5f8fa660e1ad130c68fed4ddac323453fcbf6d1ea2dc2a9897931c486da099b87dcfc047 diff --git a/media-sound/beets/beets-2.3.1.ebuild b/media-sound/beets/beets-2.3.1.ebuild new file mode 100644 index 000000000000..9638d962a78f --- /dev/null +++ b/media-sound/beets/beets-2.3.1.ebuild @@ -0,0 +1,172 @@ +# Copyright 1999-2025 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_{11..13} ) +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 multiprocessing 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 + 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" +IUSE="doc test" +RESTRICT="!test? ( test )" + +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/lap-0.5.12[${PYTHON_USEDEP}] + dev-python/mediafile[${PYTHON_USEDEP}] + >=dev-python/numpy-1.24.4[${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/typing-extensions[${PYTHON_USEDEP}] + dev-python/unidecode[${PYTHON_USEDEP}] + ')" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + doc? ( + dev-python/sphinx + dev-python/pydata-sphinx-theme + ) + $(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/pytest-flask[${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+=" + dev-python/sphinx + " +fi + +DOCS=( README.rst docs/changelog.rst ) + +EPYTEST_XDIST=1 +distutils_enable_tests pytest + +src_prepare() { + 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 +} + +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. + 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_test() { + # test/test_art_resize.py can be flaky, parallelisation? + epytest -n$(makeopts_jobs) -v +} + +python_install_all() { + distutils-r1_python_install_all + + 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 + 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 +}
