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