1 |
commit: 3ebe00e69103aa9840a84123c008ceec779e947c |
2 |
Author: Guillaume Seren <guillaumeseren <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed May 26 11:12:05 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jun 1 00:27:44 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ebe00e6 |
7 |
|
8 |
media-sound/beets: Backport patch for #790215 |
9 |
|
10 |
Package-Manager: Portage-3.0.18, Repoman-3.0.2 |
11 |
Closes: https://bugs.gentoo.org/790215 |
12 |
Signed-off-by: Guillaume Seren <guillaumeseren <AT> gmail.com> |
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
media-sound/beets/beets-1.4.9-r6.ebuild | 135 +++++++++++++++++++++ |
16 |
...place-discogs-client-with-python3-discogs.patch | 134 ++++++++++++++++++++ |
17 |
2 files changed, 269 insertions(+) |
18 |
|
19 |
diff --git a/media-sound/beets/beets-1.4.9-r6.ebuild b/media-sound/beets/beets-1.4.9-r6.ebuild |
20 |
new file mode 100644 |
21 |
index 00000000000..4fd12ebc72c |
22 |
--- /dev/null |
23 |
+++ b/media-sound/beets/beets-1.4.9-r6.ebuild |
24 |
@@ -0,0 +1,135 @@ |
25 |
+# Copyright 1999-2021 Gentoo Authors |
26 |
+# Distributed under the terms of the GNU General Public License v2 |
27 |
+ |
28 |
+EAPI=7 |
29 |
+ |
30 |
+DISTUTILS_SINGLE_IMPL=1 |
31 |
+PYTHON_COMPAT=( python3_{7..9} ) |
32 |
+PYTHON_REQ_USE="sqlite" |
33 |
+DISTUTILS_USE_SETUPTOOLS=rdepend |
34 |
+ |
35 |
+inherit distutils-r1 bash-completion-r1 optfeature |
36 |
+ |
37 |
+if [[ ${PV} == "9999" ]]; then |
38 |
+ EGIT_REPO_URI="https://github.com/beetbox/beets.git" |
39 |
+ inherit git-r3 |
40 |
+else |
41 |
+ MY_PV=${PV/_beta/-beta.} |
42 |
+ MY_P=${PN}-${MY_PV} |
43 |
+ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
44 |
+ KEYWORDS="~amd64 ~x86" |
45 |
+ S="${WORKDIR}/${MY_P}" |
46 |
+fi |
47 |
+ |
48 |
+DESCRIPTION="Media library management system for obsessive-compulsive music geeks" |
49 |
+HOMEPAGE="https://beets.io/ https://pypi.org/project/beets/" |
50 |
+ |
51 |
+LICENSE="MIT" |
52 |
+SLOT="0" |
53 |
+IUSE="doc test" |
54 |
+RESTRICT="!test? ( test )" |
55 |
+ |
56 |
+RDEPEND=" |
57 |
+ $(python_gen_cond_dep ' |
58 |
+ >=dev-python/jellyfish-0.7.1[${PYTHON_MULTI_USEDEP}] |
59 |
+ dev-python/munkres[${PYTHON_MULTI_USEDEP}] |
60 |
+ >=media-libs/mutagen-1.33[${PYTHON_MULTI_USEDEP}] |
61 |
+ >=dev-python/python-musicbrainz-ngs-0.4[${PYTHON_MULTI_USEDEP}] |
62 |
+ dev-python/pyyaml[${PYTHON_MULTI_USEDEP}] |
63 |
+ dev-python/requests-oauthlib[${PYTHON_MULTI_USEDEP}] |
64 |
+ dev-python/requests[${PYTHON_MULTI_USEDEP}] |
65 |
+ >=dev-python/six-1.9[${PYTHON_MULTI_USEDEP}] |
66 |
+ dev-python/unidecode[${PYTHON_MULTI_USEDEP}] |
67 |
+ ')" |
68 |
+DEPEND=" |
69 |
+ ${RDEPEND} |
70 |
+" |
71 |
+BDEPEND=" |
72 |
+ doc? ( |
73 |
+ dev-python/sphinx |
74 |
+ ) |
75 |
+ $(python_gen_cond_dep ' |
76 |
+ test? ( |
77 |
+ dev-db/sqlite[icu] |
78 |
+ dev-python/beautifulsoup[${PYTHON_MULTI_USEDEP}] |
79 |
+ dev-python/bluelet[${PYTHON_MULTI_USEDEP}] |
80 |
+ dev-python/discogs-client[${PYTHON_MULTI_USEDEP}] |
81 |
+ dev-python/flask[${PYTHON_MULTI_USEDEP}] |
82 |
+ dev-python/mock[${PYTHON_MULTI_USEDEP}] |
83 |
+ dev-python/pyacoustid[${PYTHON_MULTI_USEDEP}] |
84 |
+ dev-python/pylast[${PYTHON_MULTI_USEDEP}] |
85 |
+ dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}] |
86 |
+ dev-python/python-mpd[${PYTHON_MULTI_USEDEP}] |
87 |
+ dev-python/pyxdg[${PYTHON_MULTI_USEDEP}] |
88 |
+ || ( |
89 |
+ dev-python/pillow[${PYTHON_MULTI_USEDEP}] |
90 |
+ media-gfx/imagemagick |
91 |
+ ) |
92 |
+ dev-python/rarfile[${PYTHON_MULTI_USEDEP}] |
93 |
+ dev-python/responses[${PYTHON_MULTI_USEDEP}] |
94 |
+ dev-python/wheel[${PYTHON_MULTI_USEDEP}] |
95 |
+ media-libs/chromaprint[tools] |
96 |
+ media-libs/flac |
97 |
+ media-libs/gst-plugins-bad:1.0 |
98 |
+ media-libs/gst-plugins-good:1.0 |
99 |
+ media-sound/mp3val |
100 |
+ media-sound/mp3gain |
101 |
+ media-plugins/gst-plugins-libav:1.0 |
102 |
+ media-video/ffmpeg:0[encode] |
103 |
+ ) |
104 |
+ ')" |
105 |
+ |
106 |
+PATCHES=( |
107 |
+ "${FILESDIR}/${PV}-0001-compatibility-with-breaking-changes-to-the-ast-modul.patch" |
108 |
+ "${FILESDIR}/${PV}-0002-Disable-test_completion.patch" |
109 |
+ "${FILESDIR}/${PV}-0003-Try-to-work-around-a-Werkzeug-change.patch" |
110 |
+ "${FILESDIR}/${PV}-0004-Fix-3608-Replace-discogs-client-with-python3-discogs.patch" |
111 |
+) |
112 |
+ |
113 |
+DOCS=( README.rst docs/changelog.rst ) |
114 |
+ |
115 |
+distutils_enable_tests pytest |
116 |
+ |
117 |
+python_prepare_all() { |
118 |
+ distutils-r1_python_prepare_all |
119 |
+ |
120 |
+ # Tests that need network |
121 |
+ rm test/test_art.py || die "Failed to remove test_art.py" |
122 |
+ rm test/test_discogs.py || die "Failed to remove test_discogs.py" |
123 |
+ rm test/test_embyupdate.py || die "Failed to remove test_embyupdate.py" |
124 |
+ rm test/test_lastgenre.py || die "Failed to remove test_lastgenre.py" |
125 |
+ rm test/test_spotify.py || die "Failed to remove test_spotify.py" |
126 |
+ # Not working and dropped in master |
127 |
+ rm test/test_mediafile.py || die "Failed to remove test_mediafile.py" |
128 |
+} |
129 |
+ |
130 |
+python_compile_all() { |
131 |
+ use doc && esetup.py build_sphinx -b html --build-dir=docs/build |
132 |
+} |
133 |
+ |
134 |
+python_install_all() { |
135 |
+ distutils-r1_python_install_all |
136 |
+ |
137 |
+ doman man/* |
138 |
+ use doc && local HTML_DOCS=( docs/build/html/. ) |
139 |
+ einstalldocs |
140 |
+ |
141 |
+ ${PYTHON} "${ED}/usr/bin/beet" completion > "${T}/beet.bash" || die |
142 |
+ newbashcomp "${T}/beet.bash" beet |
143 |
+ insinto /usr/share/zsh/site-functions |
144 |
+ newins "${WORKDIR}/${P}/extra/_beet" _beet |
145 |
+ |
146 |
+ optfeature "badfiles support" "media-libs/flac media-sound/mp3val" |
147 |
+ optfeature "chromaprint support" "dev-python/pyacoustid media-libs/chromaprint[tools]" |
148 |
+ optfeature "discogs support" dev-python/discogs-client |
149 |
+ optfeature "ffmpeg support" media-video/ffmpeg[encode] |
150 |
+ optfeature "gstreamer support" "media-libs/gst-plugins-bad media-libs/gst-plugins-good" |
151 |
+ optfeature "icu support" dev-db/sqlite[icu] |
152 |
+ optfeature "lastfm support" dev-python/pylast |
153 |
+ optfeature "mpd support" "dev-python/bluelet dev-python/python-mpd" |
154 |
+ optfeature "replaygain with gstreamer support" "dev-python/pygobject media-plugins/gst-plugins-libav" |
155 |
+ optfeature "replaygain without gstreamer support" media-sound/mp3gain |
156 |
+ optfeature "thumbnail support" dev-python/pyxdg "dev-python/pillow media-gfx/imagemagick" |
157 |
+ optfeature "webserver support" dev-python/flask |
158 |
+ optfeature "webserver cors support" dev-python/flask-cors |
159 |
+} |
160 |
|
161 |
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 |
162 |
new file mode 100644 |
163 |
index 00000000000..f7eb3d26b75 |
164 |
--- /dev/null |
165 |
+++ b/media-sound/beets/files/1.4.9-0004-Fix-3608-Replace-discogs-client-with-python3-discogs.patch |
166 |
@@ -0,0 +1,134 @@ |
167 |
+From 0da62a5ed7aa5fcfc8501a06f26c3af6afa8bc52 Mon Sep 17 00:00:00 2001 |
168 |
+From: George Rawlinson <george@×××××××××××××.nz> |
169 |
+Date: Thu, 25 Feb 2021 20:00:34 +1300 |
170 |
+Subject: [PATCH] Fix #3608: Replace discogs-client with python3-discogs-client |
171 |
+ |
172 |
+discogs-client has been deprecated since June 2020, the replacement |
173 |
+is actively developed by the community and does not have any breaking |
174 |
+API changes. |
175 |
+ |
176 |
+Signed-off-by: George Rawlinson <george@×××××××××××××.nz> |
177 |
+--- |
178 |
+ beetsplug/discogs.py | 2 +- |
179 |
+ docs/plugins/discogs.rst | 8 +++---- |
180 |
+ setup.py | 50 +++++++++++++++++++++++++++------------- |
181 |
+ 4 files changed, 41 insertions(+), 21 deletions(-) |
182 |
+ |
183 |
+diff --git a/beetsplug/discogs.py b/beetsplug/discogs.py |
184 |
+index 5a2bf57e..78d94eb1 100644 |
185 |
+--- a/beetsplug/discogs.py |
186 |
++++ b/beetsplug/discogs.py |
187 |
+@@ -14,7 +14,7 @@ |
188 |
+ # included in all copies or substantial portions of the Software. |
189 |
+ |
190 |
+ """Adds Discogs album search support to the autotagger. Requires the |
191 |
+-discogs-client library. |
192 |
++python3-discogs-client library. |
193 |
+ """ |
194 |
+ from __future__ import division, absolute_import, print_function |
195 |
+ |
196 |
+ For plugin developers: |
197 |
+ |
198 |
+diff --git a/docs/plugins/discogs.rst b/docs/plugins/discogs.rst |
199 |
+index a02b3459..f8406fd2 100644 |
200 |
+--- a/docs/plugins/discogs.rst |
201 |
++++ b/docs/plugins/discogs.rst |
202 |
+@@ -10,9 +10,9 @@ Installation |
203 |
+ ------------ |
204 |
+ |
205 |
+ To use the ``discogs`` plugin, first enable it in your configuration (see |
206 |
+-:ref:`using-plugins`). Then, install the `discogs-client`_ library by typing:: |
207 |
++:ref:`using-plugins`). Then, install the `python3-discogs-client`_ library by typing:: |
208 |
+ |
209 |
+- pip install discogs-client |
210 |
++ pip install python3-discogs-client |
211 |
+ |
212 |
+ You will also need to register for a `Discogs`_ account, and provide |
213 |
+ authentication credentials via a personal access token or an OAuth2 |
214 |
+@@ -36,7 +36,7 @@ Authentication via Personal Access Token |
215 |
+ |
216 |
+ As an alternative to OAuth, you can get a token from Discogs and add it to |
217 |
+ your configuration. |
218 |
+-To get a personal access token (called a "user token" in the `discogs-client`_ |
219 |
++To get a personal access token (called a "user token" in the `python3-discogs-client`_ |
220 |
+ documentation), login to `Discogs`_, and visit the |
221 |
+ `Developer settings page |
222 |
+ <https://www.discogs.com/settings/developers>`_. Press the ``Generate new |
223 |
+@@ -57,4 +57,4 @@ Here are two things you can try: |
224 |
+ * Make sure that your system clock is accurate. The Discogs servers can reject |
225 |
+ your request if your clock is too out of sync. |
226 |
+ |
227 |
+-.. _discogs-client: https://github.com/discogs/discogs_client |
228 |
++.. _python3-discogs-client: https://github.com/joalla/discogs_client |
229 |
+diff --git a/setup.py b/setup.py |
230 |
+index 79278f8b..768c40a0 100755 |
231 |
+--- a/setup.py |
232 |
++++ b/setup.py |
233 |
+@@ -107,30 +107,48 @@ setup( |
234 |
+ ['colorama'] if (sys.platform == 'win32') else [] |
235 |
+ ), |
236 |
+ |
237 |
+- tests_require=[ |
238 |
+- 'beautifulsoup4', |
239 |
+- 'flask', |
240 |
+- 'mock', |
241 |
+- 'pylast', |
242 |
+- 'rarfile', |
243 |
+- 'responses', |
244 |
+- 'pyxdg', |
245 |
+- 'python-mpd2', |
246 |
+- 'discogs-client' |
247 |
+- ] + ( |
248 |
+- # Tests for the thumbnails plugin need pathlib on Python 2 too. |
249 |
+- ['pathlib'] if (sys.version_info < (3, 4, 0)) else [] |
250 |
+- ), |
251 |
+- |
252 |
+ # Plugin (optional) dependencies: |
253 |
+ extras_require={ |
254 |
++ 'test': [ |
255 |
++ 'beautifulsoup4', |
256 |
++ 'coverage', |
257 |
++ 'flask', |
258 |
++ 'mock', |
259 |
++ 'pylast', |
260 |
++ 'pytest', |
261 |
++ 'python-mpd2', |
262 |
++ 'pyxdg', |
263 |
++ 'responses>=0.3.0', |
264 |
++ 'requests_oauthlib', |
265 |
++ 'reflink', |
266 |
++ ] + ( |
267 |
++ # Tests for the thumbnails plugin need pathlib on Python 2 too. |
268 |
++ ['pathlib'] if (sys.version_info < (3, 4, 0)) else [] |
269 |
++ ) + [ |
270 |
++ 'rarfile<4' if sys.version_info < (3, 6, 0) else 'rarfile', |
271 |
++ ] + [ |
272 |
++ 'discogs-client' if (sys.version_info < (3, 0, 0)) |
273 |
++ else 'python3-discogs-client' |
274 |
++ ], |
275 |
++ 'lint': [ |
276 |
++ 'flake8', |
277 |
++ 'flake8-coding', |
278 |
++ 'flake8-docstrings', |
279 |
++ 'flake8-future-import', |
280 |
++ 'pep8-naming', |
281 |
++ ], |
282 |
++ |
283 |
++ # Plugin (optional) dependencies: |
284 |
+ 'absubmit': ['requests'], |
285 |
+ 'fetchart': ['requests', 'Pillow'], |
286 |
+ 'embedart': ['Pillow'], |
287 |
+ 'embyupdate': ['requests'], |
288 |
+ 'chroma': ['pyacoustid'], |
289 |
+ 'gmusic': ['gmusicapi'], |
290 |
+- 'discogs': ['discogs-client>=2.2.1'], |
291 |
++ 'discogs': ( |
292 |
++ ['discogs-client' if (sys.version_info < (3, 0, 0)) |
293 |
++ else 'python3-discogs-client'] |
294 |
++ ), |
295 |
+ 'beatport': ['requests-oauthlib>=0.6.1'], |
296 |
+ 'kodiupdate': ['requests'], |
297 |
+ 'lastgenre': ['pylast'], |
298 |
+-- |
299 |
+2.26.3 |
300 |
+ |