Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/beets/files/, media-sound/beets/
Date: Sun, 31 Oct 2021 02:58:08
Message-Id: 1635649042.45b05de8cffb4e5b1398b572db832a0285be3428.sam@gentoo
1 commit: 45b05de8cffb4e5b1398b572db832a0285be3428
2 Author: Arsen Arsenović <arsen <AT> aarsen <DOT> me>
3 AuthorDate: Thu Oct 21 21:48:12 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 31 02:57:22 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45b05de8
7
8 media-sound/beets: bump to version 1.5.0
9
10 Package-Manager: Portage-3.0.20, Repoman-3.0.3
11 Signed-off-by: Arsen Arsenović <arsen <AT> aarsen.me>
12 Signed-off-by: Sam James <sam <AT> gentoo.org>
13
14 media-sound/beets/Manifest | 1 +
15 media-sound/beets/beets-1.5.0.ebuild | 126 +++++++++++++++++++++
16 .../files/1.5.0-0001-Remove-test_completion.patch | 74 ++++++++++++
17 3 files changed, 201 insertions(+)
18
19 diff --git a/media-sound/beets/Manifest b/media-sound/beets/Manifest
20 index 2385fe9f1b1..2ef455a86dc 100644
21 --- a/media-sound/beets/Manifest
22 +++ b/media-sound/beets/Manifest
23 @@ -1 +1,2 @@
24 DIST beets-1.4.9.tar.gz 1494459 BLAKE2B 2daf77caf395143813c8b288fc376b5aec01d49281d40ba5942daf9941891146d698a1517ced958e480c6f253eadb6a7e09029e079c97e6cc17d44ac18fa0e7b SHA512 616bad4ca3ecdd05d2f59846fd67215f476ce89cc34d63bc6351efcbaf1e33e5ca783cb8a716e8597b56a7e08e6a6dc15e64b51e89dd786bfb6c5d847f66de5a
25 +DIST beets-1.5.0.tar.gz 1694845 BLAKE2B e4a4ad880edcc396170bca9e7d04548f22a55eac22481d2babca0d2ca71237ed0509bf9be9af12343b0d1b555e9726446e5d61e637312a4808eece5ce0302f33 SHA512 447b01dc750a69d0a33d271774f3bd3b997a203d80c220c1a961f9a8e30420d263b1e2a4682d25ff7b02e1e85155f42186cb0d3bf27ebc8c2777f68e197d4018
26
27 diff --git a/media-sound/beets/beets-1.5.0.ebuild b/media-sound/beets/beets-1.5.0.ebuild
28 new file mode 100644
29 index 00000000000..aa73a47719c
30 --- /dev/null
31 +++ b/media-sound/beets/beets-1.5.0.ebuild
32 @@ -0,0 +1,126 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +DISTUTILS_SINGLE_IMPL=1
39 +PYTHON_COMPAT=( python3_{8..9} )
40 +PYTHON_REQ_USE="sqlite"
41 +
42 +inherit distutils-r1 bash-completion-r1 optfeature
43 +
44 +if [[ ${PV} == "9999" ]]; then
45 + EGIT_REPO_URI="https://github.com/beetbox/beets.git"
46 + inherit git-r3
47 +else
48 + MY_PV=${PV/_beta/-beta.}
49 + MY_P=${PN}-${MY_PV}
50 + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
51 + KEYWORDS="~amd64"
52 + S="${WORKDIR}/${MY_P}"
53 +fi
54 +
55 +DESCRIPTION="Media library management system for obsessive-compulsive music geeks"
56 +HOMEPAGE="https://beets.io/ https://pypi.org/project/beets/"
57 +
58 +LICENSE="MIT"
59 +SLOT="0"
60 +IUSE="doc test"
61 +RESTRICT="!test? ( test )"
62 +
63 +RDEPEND="
64 + $(python_gen_cond_dep '
65 + >=dev-python/jellyfish-0.7.1[${PYTHON_USEDEP}]
66 + dev-python/munkres[${PYTHON_USEDEP}]
67 + >=media-libs/mutagen-1.33[${PYTHON_USEDEP}]
68 + >=dev-python/python-musicbrainzngs-0.4[${PYTHON_USEDEP}]
69 + dev-python/pyyaml[${PYTHON_USEDEP}]
70 + dev-python/requests-oauthlib[${PYTHON_USEDEP}]
71 + dev-python/requests[${PYTHON_USEDEP}]
72 + >=dev-python/six-1.9[${PYTHON_USEDEP}]
73 + dev-python/unidecode[${PYTHON_USEDEP}]
74 + ')"
75 +DEPEND="
76 + ${RDEPEND}
77 +"
78 +BDEPEND="
79 + doc? (
80 + dev-python/sphinx
81 + )
82 + $(python_gen_cond_dep '
83 + test? (
84 + dev-db/sqlite[icu]
85 + dev-python/beautifulsoup4[${PYTHON_USEDEP}]
86 + dev-python/bluelet[${PYTHON_USEDEP}]
87 + dev-python/discogs-client[${PYTHON_USEDEP}]
88 + dev-python/flask[${PYTHON_USEDEP}]
89 + dev-python/mock[${PYTHON_USEDEP}]
90 + dev-python/pyacoustid[${PYTHON_USEDEP}]
91 + dev-python/pylast[${PYTHON_USEDEP}]
92 + dev-python/pygobject:3[${PYTHON_USEDEP}]
93 + dev-python/python-mpd[${PYTHON_USEDEP}]
94 + dev-python/pyxdg[${PYTHON_USEDEP}]
95 + || (
96 + dev-python/pillow[${PYTHON_USEDEP}]
97 + media-gfx/imagemagick
98 + )
99 + dev-python/rarfile[${PYTHON_USEDEP}]
100 + dev-python/responses[${PYTHON_USEDEP}]
101 + dev-python/wheel[${PYTHON_USEDEP}]
102 + media-libs/chromaprint[tools]
103 + media-libs/flac
104 + media-libs/gst-plugins-bad:1.0
105 + media-libs/gst-plugins-good:1.0
106 + media-sound/mp3val
107 + media-sound/mp3gain
108 + media-plugins/gst-plugins-libav:1.0
109 + media-video/ffmpeg:0[encode]
110 + app-shells/bash-completion
111 + dev-python/reflink
112 + dev-python/confuse
113 + dev-python/mediafile
114 + )
115 + ')"
116 +
117 +PATCHES=(
118 + "${FILESDIR}/${PV}-0001-Remove-test_completion.patch"
119 +)
120 +
121 +DOCS=( README.rst docs/changelog.rst )
122 +
123 +distutils_enable_tests pytest
124 +
125 +python_prepare_all() {
126 + distutils-r1_python_prepare_all
127 +}
128 +
129 +python_compile_all() {
130 + use doc && esetup.py build_sphinx -b html --build-dir=docs/build
131 +}
132 +
133 +python_install_all() {
134 + distutils-r1_python_install_all
135 +
136 + doman man/*
137 + use doc && local HTML_DOCS=( docs/build/html/. )
138 + einstalldocs
139 +
140 + ${PYTHON} "${ED}/usr/bin/beet" completion > "${T}/beet.bash" || die
141 + newbashcomp "${T}/beet.bash" beet
142 + insinto /usr/share/zsh/site-functions
143 + newins "${WORKDIR}/${P}/extra/_beet" _beet
144 +
145 + optfeature "badfiles support" "media-libs/flac media-sound/mp3val"
146 + optfeature "chromaprint support" "dev-python/pyacoustid media-libs/chromaprint[tools]"
147 + optfeature "discogs support" dev-python/discogs-client
148 + optfeature "ffmpeg support" media-video/ffmpeg[encode]
149 + optfeature "gstreamer support" "media-libs/gst-plugins-bad media-libs/gst-plugins-good"
150 + optfeature "icu support" dev-db/sqlite[icu]
151 + optfeature "lastfm support" dev-python/pylast
152 + optfeature "mpd support" "dev-python/bluelet dev-python/python-mpd"
153 + optfeature "replaygain with gstreamer support" "dev-python/pygobject media-plugins/gst-plugins-libav"
154 + optfeature "replaygain without gstreamer support" media-sound/mp3gain
155 + optfeature "thumbnail support" dev-python/pyxdg "dev-python/pillow media-gfx/imagemagick"
156 + optfeature "webserver support" dev-python/flask
157 + optfeature "webserver cors support" dev-python/flask-cors
158 +}
159
160 diff --git a/media-sound/beets/files/1.5.0-0001-Remove-test_completion.patch b/media-sound/beets/files/1.5.0-0001-Remove-test_completion.patch
161 new file mode 100644
162 index 00000000000..16c1a6fe5fa
163 --- /dev/null
164 +++ b/media-sound/beets/files/1.5.0-0001-Remove-test_completion.patch
165 @@ -0,0 +1,74 @@
166 +From a992bf194803d3598a8edc054a767858b0355a78 Mon Sep 17 00:00:00 2001
167 +From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@××××××.me>
168 +Date: Thu, 21 Oct 2021 23:16:45 +0200
169 +Subject: [PATCH] Remove test_completion
170 +
171 +Known issue: https://github.com/beetbox/beets/issues/1876
172 +---
173 + test/test_ui.py | 50 -------------------------------------------------
174 + 1 file changed, 50 deletions(-)
175 +
176 +diff --git a/test/test_ui.py b/test/test_ui.py
177 +index 5cfed1fd..48e7cc85 100644
178 +--- a/test/test_ui.py
179 ++++ b/test/test_ui.py
180 +@@ -1209,56 +1209,6 @@ class PluginTest(_common.TestCase, TestHelper):
181 + self.run_command('test', lib=None)
182 +
183 +
184 +-@_common.slow_test()
185 +-class CompletionTest(_common.TestCase, TestHelper):
186 +- def test_completion(self):
187 +- # Load plugin commands
188 +- config['pluginpath'] = [_common.PLUGINPATH]
189 +- config['plugins'] = ['test']
190 +-
191 +- # Do not load any other bash completion scripts on the system.
192 +- env = dict(os.environ)
193 +- env['BASH_COMPLETION_DIR'] = os.devnull
194 +- env['BASH_COMPLETION_COMPAT_DIR'] = os.devnull
195 +-
196 +- # Open a `bash` process to run the tests in. We'll pipe in bash
197 +- # commands via stdin.
198 +- cmd = os.environ.get('BEETS_TEST_SHELL', '/bin/bash --norc').split()
199 +- if not has_program(cmd[0]):
200 +- self.skipTest(u'bash not available')
201 +- tester = subprocess.Popen(cmd, stdin=subprocess.PIPE,
202 +- stdout=subprocess.PIPE, env=env)
203 +-
204 +- # Load bash_completion library.
205 +- for path in commands.BASH_COMPLETION_PATHS:
206 +- if os.path.exists(util.syspath(path)):
207 +- bash_completion = path
208 +- break
209 +- else:
210 +- self.skipTest(u'bash-completion script not found')
211 +- try:
212 +- with open(util.syspath(bash_completion), 'rb') as f:
213 +- tester.stdin.writelines(f)
214 +- except IOError:
215 +- self.skipTest(u'could not read bash-completion script')
216 +-
217 +- # Load completion script.
218 +- self.io.install()
219 +- self.run_command('completion', lib=None)
220 +- completion_script = self.io.getoutput().encode('utf-8')
221 +- self.io.restore()
222 +- tester.stdin.writelines(completion_script.splitlines(True))
223 +-
224 +- # Load test suite.
225 +- test_script_name = os.path.join(_common.RSRC, b'test_completion.sh')
226 +- with open(test_script_name, 'rb') as test_script_file:
227 +- tester.stdin.writelines(test_script_file)
228 +- out, err = tester.communicate()
229 +- if tester.returncode != 0 or out != b'completion tests passed\n':
230 +- print(out.decode('utf-8'))
231 +- self.fail(u'test/test_completion.sh did not execute properly')
232 +-
233 +-
234 + class CommonOptionsParserCliTest(unittest.TestCase, TestHelper):
235 + """Test CommonOptionsParser and formatting LibModel formatting on 'list'
236 + command.
237 +--
238 +2.32.0
239 +