From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 69CB113835B for ; Tue, 1 Jun 2021 00:28:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2A386E0875; Tue, 1 Jun 2021 00:28:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 00BAAE0875 for ; Tue, 1 Jun 2021 00:28:30 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0144E340F47 for ; Tue, 1 Jun 2021 00:28:27 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A0FA37A0 for ; Tue, 1 Jun 2021 00:28:23 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1622507264.3ebe00e69103aa9840a84123c008ceec779e947c.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/beets/, media-sound/beets/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-sound/beets/beets-1.4.9-r6.ebuild media-sound/beets/files/1.4.9-0004-Fix-3608-Replace-discogs-client-with-python3-discogs.patch X-VCS-Directories: media-sound/beets/files/ media-sound/beets/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 3ebe00e69103aa9840a84123c008ceec779e947c X-VCS-Branch: master Date: Tue, 1 Jun 2021 00:28:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 3e65ffa1-b9a3-44d4-9c6c-fefb65cdc47f X-Archives-Hash: ce02242f35044d01f13bc2a6cec53e64 commit: 3ebe00e69103aa9840a84123c008ceec779e947c Author: Guillaume Seren gmail com> AuthorDate: Wed May 26 11:12:05 2021 +0000 Commit: Sam James gentoo org> CommitDate: Tue Jun 1 00:27:44 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ebe00e6 media-sound/beets: Backport patch for #790215 Package-Manager: Portage-3.0.18, Repoman-3.0.2 Closes: https://bugs.gentoo.org/790215 Signed-off-by: Guillaume Seren gmail.com> Signed-off-by: Sam James gentoo.org> media-sound/beets/beets-1.4.9-r6.ebuild | 135 +++++++++++++++++++++ ...place-discogs-client-with-python3-discogs.patch | 134 ++++++++++++++++++++ 2 files changed, 269 insertions(+) diff --git a/media-sound/beets/beets-1.4.9-r6.ebuild b/media-sound/beets/beets-1.4.9-r6.ebuild new file mode 100644 index 00000000000..4fd12ebc72c --- /dev/null +++ b/media-sound/beets/beets-1.4.9-r6.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +DISTUTILS_SINGLE_IMPL=1 +PYTHON_COMPAT=( python3_{7..9} ) +PYTHON_REQ_USE="sqlite" +DISTUTILS_USE_SETUPTOOLS=rdepend + +inherit distutils-r1 bash-completion-r1 optfeature + +if [[ ${PV} == "9999" ]]; then + EGIT_REPO_URI="https://github.com/beetbox/beets.git" + inherit git-r3 +else + MY_PV=${PV/_beta/-beta.} + MY_P=${PN}-${MY_PV} + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + KEYWORDS="~amd64 ~x86" + S="${WORKDIR}/${MY_P}" +fi + +DESCRIPTION="Media library management system for obsessive-compulsive 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_MULTI_USEDEP}] + dev-python/munkres[${PYTHON_MULTI_USEDEP}] + >=media-libs/mutagen-1.33[${PYTHON_MULTI_USEDEP}] + >=dev-python/python-musicbrainz-ngs-0.4[${PYTHON_MULTI_USEDEP}] + dev-python/pyyaml[${PYTHON_MULTI_USEDEP}] + dev-python/requests-oauthlib[${PYTHON_MULTI_USEDEP}] + dev-python/requests[${PYTHON_MULTI_USEDEP}] + >=dev-python/six-1.9[${PYTHON_MULTI_USEDEP}] + dev-python/unidecode[${PYTHON_MULTI_USEDEP}] + ')" +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + doc? ( + dev-python/sphinx + ) + $(python_gen_cond_dep ' + test? ( + dev-db/sqlite[icu] + dev-python/beautifulsoup[${PYTHON_MULTI_USEDEP}] + dev-python/bluelet[${PYTHON_MULTI_USEDEP}] + dev-python/discogs-client[${PYTHON_MULTI_USEDEP}] + dev-python/flask[${PYTHON_MULTI_USEDEP}] + dev-python/mock[${PYTHON_MULTI_USEDEP}] + dev-python/pyacoustid[${PYTHON_MULTI_USEDEP}] + dev-python/pylast[${PYTHON_MULTI_USEDEP}] + dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}] + dev-python/python-mpd[${PYTHON_MULTI_USEDEP}] + dev-python/pyxdg[${PYTHON_MULTI_USEDEP}] + || ( + dev-python/pillow[${PYTHON_MULTI_USEDEP}] + media-gfx/imagemagick + ) + dev-python/rarfile[${PYTHON_MULTI_USEDEP}] + dev-python/responses[${PYTHON_MULTI_USEDEP}] + dev-python/wheel[${PYTHON_MULTI_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:0[encode] + ) + ')" + +PATCHES=( + "${FILESDIR}/${PV}-0001-compatibility-with-breaking-changes-to-the-ast-modul.patch" + "${FILESDIR}/${PV}-0002-Disable-test_completion.patch" + "${FILESDIR}/${PV}-0003-Try-to-work-around-a-Werkzeug-change.patch" + "${FILESDIR}/${PV}-0004-Fix-3608-Replace-discogs-client-with-python3-discogs.patch" +) + +DOCS=( README.rst docs/changelog.rst ) + +distutils_enable_tests pytest + +python_prepare_all() { + distutils-r1_python_prepare_all + + # Tests that need network + rm test/test_art.py || die "Failed to remove test_art.py" + rm test/test_discogs.py || die "Failed to remove test_discogs.py" + rm test/test_embyupdate.py || die "Failed to remove test_embyupdate.py" + rm test/test_lastgenre.py || die "Failed to remove test_lastgenre.py" + rm test/test_spotify.py || die "Failed to remove test_spotify.py" + # Not working and dropped in master + rm test/test_mediafile.py || die "Failed to remove test_mediafile.py" +} + +python_compile_all() { + use doc && esetup.py build_sphinx -b html --build-dir=docs/build +} + +python_install_all() { + distutils-r1_python_install_all + + doman man/* + use doc && local HTML_DOCS=( docs/build/html/. ) + einstalldocs + + ${PYTHON} "${ED}/usr/bin/beet" completion > "${T}/beet.bash" || die + newbashcomp "${T}/beet.bash" beet + insinto /usr/share/zsh/site-functions + newins "${WORKDIR}/${P}/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/discogs-client + optfeature "ffmpeg support" media-video/ffmpeg[encode] + 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-mpd" + 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 +} diff --git a/media-sound/beets/files/1.4.9-0004-Fix-3608-Replace-discogs-client-with-python3-discogs.patch b/media-sound/beets/files/1.4.9-0004-Fix-3608-Replace-discogs-client-with-python3-discogs.patch new file mode 100644 index 00000000000..f7eb3d26b75 --- /dev/null +++ b/media-sound/beets/files/1.4.9-0004-Fix-3608-Replace-discogs-client-with-python3-discogs.patch @@ -0,0 +1,134 @@ +From 0da62a5ed7aa5fcfc8501a06f26c3af6afa8bc52 Mon Sep 17 00:00:00 2001 +From: George Rawlinson +Date: Thu, 25 Feb 2021 20:00:34 +1300 +Subject: [PATCH] Fix #3608: Replace discogs-client with python3-discogs-client + +discogs-client has been deprecated since June 2020, the replacement +is actively developed by the community and does not have any breaking +API changes. + +Signed-off-by: George Rawlinson +--- + beetsplug/discogs.py | 2 +- + docs/plugins/discogs.rst | 8 +++---- + setup.py | 50 +++++++++++++++++++++++++++------------- + 4 files changed, 41 insertions(+), 21 deletions(-) + +diff --git a/beetsplug/discogs.py b/beetsplug/discogs.py +index 5a2bf57e..78d94eb1 100644 +--- a/beetsplug/discogs.py ++++ b/beetsplug/discogs.py +@@ -14,7 +14,7 @@ + # included in all copies or substantial portions of the Software. + + """Adds Discogs album search support to the autotagger. Requires the +-discogs-client library. ++python3-discogs-client library. + """ + from __future__ import division, absolute_import, print_function + + For plugin developers: + +diff --git a/docs/plugins/discogs.rst b/docs/plugins/discogs.rst +index a02b3459..f8406fd2 100644 +--- a/docs/plugins/discogs.rst ++++ b/docs/plugins/discogs.rst +@@ -10,9 +10,9 @@ Installation + ------------ + + To use the ``discogs`` plugin, first enable it in your configuration (see +-:ref:`using-plugins`). Then, install the `discogs-client`_ library by typing:: ++:ref:`using-plugins`). Then, install the `python3-discogs-client`_ library by typing:: + +- pip install discogs-client ++ pip install python3-discogs-client + + You will also need to register for a `Discogs`_ account, and provide + authentication credentials via a personal access token or an OAuth2 +@@ -36,7 +36,7 @@ Authentication via Personal Access Token + + As an alternative to OAuth, you can get a token from Discogs and add it to + your configuration. +-To get a personal access token (called a "user token" in the `discogs-client`_ ++To get a personal access token (called a "user token" in the `python3-discogs-client`_ + documentation), login to `Discogs`_, and visit the + `Developer settings page + `_. Press the ``Generate new +@@ -57,4 +57,4 @@ Here are two things you can try: + * Make sure that your system clock is accurate. The Discogs servers can reject + your request if your clock is too out of sync. + +-.. _discogs-client: https://github.com/discogs/discogs_client ++.. _python3-discogs-client: https://github.com/joalla/discogs_client +diff --git a/setup.py b/setup.py +index 79278f8b..768c40a0 100755 +--- a/setup.py ++++ b/setup.py +@@ -107,30 +107,48 @@ setup( + ['colorama'] if (sys.platform == 'win32') else [] + ), + +- tests_require=[ +- 'beautifulsoup4', +- 'flask', +- 'mock', +- 'pylast', +- 'rarfile', +- 'responses', +- 'pyxdg', +- 'python-mpd2', +- 'discogs-client' +- ] + ( +- # Tests for the thumbnails plugin need pathlib on Python 2 too. +- ['pathlib'] if (sys.version_info < (3, 4, 0)) else [] +- ), +- + # Plugin (optional) dependencies: + extras_require={ ++ 'test': [ ++ 'beautifulsoup4', ++ 'coverage', ++ 'flask', ++ 'mock', ++ 'pylast', ++ 'pytest', ++ 'python-mpd2', ++ 'pyxdg', ++ 'responses>=0.3.0', ++ 'requests_oauthlib', ++ 'reflink', ++ ] + ( ++ # Tests for the thumbnails plugin need pathlib on Python 2 too. ++ ['pathlib'] if (sys.version_info < (3, 4, 0)) else [] ++ ) + [ ++ 'rarfile<4' if sys.version_info < (3, 6, 0) else 'rarfile', ++ ] + [ ++ 'discogs-client' if (sys.version_info < (3, 0, 0)) ++ else 'python3-discogs-client' ++ ], ++ 'lint': [ ++ 'flake8', ++ 'flake8-coding', ++ 'flake8-docstrings', ++ 'flake8-future-import', ++ 'pep8-naming', ++ ], ++ ++ # Plugin (optional) dependencies: + 'absubmit': ['requests'], + 'fetchart': ['requests', 'Pillow'], + 'embedart': ['Pillow'], + 'embyupdate': ['requests'], + 'chroma': ['pyacoustid'], + 'gmusic': ['gmusicapi'], +- 'discogs': ['discogs-client>=2.2.1'], ++ 'discogs': ( ++ ['discogs-client' if (sys.version_info < (3, 0, 0)) ++ else 'python3-discogs-client'] ++ ), + 'beatport': ['requests-oauthlib>=0.6.1'], + 'kodiupdate': ['requests'], + 'lastgenre': ['pylast'], +-- +2.26.3 +