1 |
commit: 3b599ad6587752063fd42e3b9c7fed33771d494e |
2 |
Author: Guillaume Seren <guillaumeseren <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Apr 25 17:31:10 2020 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jun 1 12:28:16 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b599ad6 |
7 |
|
8 |
media-sound/beets: cleanup ebuild |
9 |
|
10 |
Closes: https://bugs.gentoo.org/718398 |
11 |
Bug: https://bugs.gentoo.org/702914 |
12 |
Bug: https://bugs.gentoo.org/693164 |
13 |
Closes: https://bugs.gentoo.org/584276 |
14 |
|
15 |
Signed-off-by: Guillaume Seren <guillaumeseren <AT> gmail.com> |
16 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
17 |
|
18 |
media-sound/beets/beets-1.4.9-r1.ebuild | 179 +++++++++++++++++++------------- |
19 |
1 file changed, 107 insertions(+), 72 deletions(-) |
20 |
|
21 |
diff --git a/media-sound/beets/beets-1.4.9-r1.ebuild b/media-sound/beets/beets-1.4.9-r1.ebuild |
22 |
index c8b7ae1874f..8925b67b676 100644 |
23 |
--- a/media-sound/beets/beets-1.4.9-r1.ebuild |
24 |
+++ b/media-sound/beets/beets-1.4.9-r1.ebuild |
25 |
@@ -1,82 +1,101 @@ |
26 |
-# Copyright 1999-2019 Gentoo Authors |
27 |
+# Copyright 1999-2020 Gentoo Authors |
28 |
# Distributed under the terms of the GNU General Public License v2 |
29 |
|
30 |
EAPI=7 |
31 |
|
32 |
-MY_PV=${PV/_beta/-beta.} |
33 |
-MY_P=${PN}-${MY_PV} |
34 |
- |
35 |
-PYTHON_COMPAT=( python3_6 ) |
36 |
+DISTUTILS_SINGLE_IMPL=1 |
37 |
+PYTHON_COMPAT=( python{2_7,3_{6,7,8}} ) |
38 |
PYTHON_REQ_USE="sqlite" |
39 |
-inherit distutils-r1 |
40 |
+ |
41 |
+inherit distutils-r1 bash-completion-r1 |
42 |
+ |
43 |
+if [[ ${PV} == "9999" ]]; then |
44 |
+ EGIT_REPO_URI="https://github.com/beetbox/beets.git" |
45 |
+ inherit git-r3 |
46 |
+ KEYWORDS="~amd64 ~x86" |
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 ~x86" |
52 |
+ S="${WORKDIR}/${MY_P}" |
53 |
+fi |
54 |
|
55 |
DESCRIPTION="Media library management system for obsessive-compulsive music geeks" |
56 |
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
57 |
HOMEPAGE="http://beets.io/ https://pypi.org/project/beets/" |
58 |
|
59 |
-KEYWORDS="~amd64 ~x86" |
60 |
-SLOT="0" |
61 |
LICENSE="MIT" |
62 |
+SLOT="0" |
63 |
IUSE="badfiles chromaprint discogs doc ffmpeg gstreamer icu lastfm mpd replaygain test thumbnail webserver" |
64 |
|
65 |
-BDEPEND=" |
66 |
- dev-python/setuptools[${PYTHON_USEDEP}] |
67 |
- doc? ( dev-python/sphinx[${PYTHON_USEDEP}] ) |
68 |
-" |
69 |
+RDEPEND="${DEPEND}" |
70 |
DEPEND=" |
71 |
- >=dev-python/jellyfish-0.7.1[${PYTHON_USEDEP}] |
72 |
- dev-python/munkres[${PYTHON_USEDEP}] |
73 |
- >=dev-python/python-musicbrainz-ngs-0.4[${PYTHON_USEDEP}] |
74 |
- dev-python/pyyaml[${PYTHON_USEDEP}] |
75 |
- dev-python/requests[${PYTHON_USEDEP}] |
76 |
- dev-python/requests-oauthlib[${PYTHON_USEDEP}] |
77 |
- >=dev-python/six-1.9[${PYTHON_USEDEP}] |
78 |
- dev-python/unidecode[${PYTHON_USEDEP}] |
79 |
- >=media-libs/mutagen-1.33[${PYTHON_USEDEP}] |
80 |
- badfiles? ( |
81 |
- media-libs/flac |
82 |
- media-sound/mp3val |
83 |
- ) |
84 |
- chromaprint? ( |
85 |
- dev-python/pyacoustid[${PYTHON_USEDEP}] |
86 |
- media-libs/chromaprint[tools] |
87 |
- ) |
88 |
- discogs? ( dev-python/discogs-client[${PYTHON_USEDEP}] ) |
89 |
- ffmpeg? ( media-video/ffmpeg:0[encode] ) |
90 |
- gstreamer? ( |
91 |
- media-libs/gst-plugins-good:1.0 |
92 |
- media-libs/gst-plugins-bad:1.0 |
93 |
- ) |
94 |
- icu? ( dev-db/sqlite[icu] ) |
95 |
- lastfm? ( dev-python/pylast[${PYTHON_USEDEP}] ) |
96 |
- mpd? ( |
97 |
- dev-python/bluelet[${PYTHON_USEDEP}] |
98 |
- dev-python/python-mpd[${PYTHON_USEDEP}] |
99 |
- ) |
100 |
- replaygain? ( |
101 |
+ $(python_gen_cond_dep ' |
102 |
+ test? ( |
103 |
+ dev-python/wheel[${PYTHON_MULTI_USEDEP}] |
104 |
+ dev-python/beautifulsoup[${PYTHON_MULTI_USEDEP}] |
105 |
+ dev-python/flask[${PYTHON_MULTI_USEDEP}] |
106 |
+ dev-python/mock[${PYTHON_MULTI_USEDEP}] |
107 |
+ dev-python/rarfile[${PYTHON_MULTI_USEDEP}] |
108 |
+ dev-python/responses[${PYTHON_MULTI_USEDEP}] |
109 |
+ dev-python/pyxdg[${PYTHON_MULTI_USEDEP}] |
110 |
+ ) |
111 |
+ >=dev-python/jellyfish-0.7.1[${PYTHON_MULTI_USEDEP}] |
112 |
+ dev-python/munkres[${PYTHON_MULTI_USEDEP}] |
113 |
+ >=dev-python/python-musicbrainz-ngs-0.4[${PYTHON_MULTI_USEDEP}] |
114 |
+ dev-python/pyyaml[${PYTHON_MULTI_USEDEP}] |
115 |
+ dev-python/requests[${PYTHON_MULTI_USEDEP}] |
116 |
+ dev-python/requests-oauthlib[${PYTHON_MULTI_USEDEP}] |
117 |
+ >=dev-python/six-1.9[${PYTHON_MULTI_USEDEP}] |
118 |
+ dev-python/unidecode[${PYTHON_MULTI_USEDEP}] |
119 |
+ >=media-libs/mutagen-1.33[${PYTHON_MULTI_USEDEP}] |
120 |
+ badfiles? ( |
121 |
+ media-libs/flac |
122 |
+ media-sound/mp3val |
123 |
+ ) |
124 |
+ chromaprint? ( |
125 |
+ dev-python/pyacoustid[${PYTHON_MULTI_USEDEP}] |
126 |
+ media-libs/chromaprint[tools] |
127 |
+ ) |
128 |
+ discogs? ( dev-python/discogs-client[${PYTHON_MULTI_USEDEP}] ) |
129 |
+ ffmpeg? ( media-video/ffmpeg:0[encode] ) |
130 |
gstreamer? ( |
131 |
- dev-python/pygobject:3[${PYTHON_USEDEP}] |
132 |
- media-plugins/gst-plugins-libav:1.0 |
133 |
+ media-libs/gst-plugins-good:1.0 |
134 |
+ media-libs/gst-plugins-bad:1.0 |
135 |
) |
136 |
- !gstreamer? ( media-sound/mp3gain ) |
137 |
- ) |
138 |
- thumbnail? ( |
139 |
- dev-python/pyxdg[${PYTHON_USEDEP}] |
140 |
- || ( |
141 |
- dev-python/pillow[${PYTHON_USEDEP}] |
142 |
- media-gfx/imagemagick |
143 |
+ icu? ( dev-db/sqlite[icu] ) |
144 |
+ lastfm? ( dev-python/pylast[${PYTHON_MULTI_USEDEP}] ) |
145 |
+ mpd? ( |
146 |
+ dev-python/bluelet[${PYTHON_MULTI_USEDEP}] |
147 |
+ dev-python/python-mpd[${PYTHON_MULTI_USEDEP}] |
148 |
) |
149 |
- ) |
150 |
- webserver? ( |
151 |
- dev-python/flask[${PYTHON_USEDEP}] |
152 |
- dev-python/flask-cors[${PYTHON_USEDEP}] |
153 |
- ) |
154 |
-" |
155 |
-RDEPEND="${DEPEND}" |
156 |
+ replaygain? ( |
157 |
+ gstreamer? ( |
158 |
+ dev-python/pygobject:3[${PYTHON_MULTI_USEDEP}] |
159 |
+ media-plugins/gst-plugins-libav:1.0 |
160 |
+ ) |
161 |
+ !gstreamer? ( media-sound/mp3gain ) |
162 |
+ ) |
163 |
+ thumbnail? ( |
164 |
+ dev-python/pyxdg[${PYTHON_MULTI_USEDEP}] |
165 |
+ || ( |
166 |
+ dev-python/pillow[${PYTHON_MULTI_USEDEP}] |
167 |
+ media-gfx/imagemagick |
168 |
+ ) |
169 |
+ ) |
170 |
+ webserver? ( |
171 |
+ dev-python/flask[${PYTHON_MULTI_USEDEP}] |
172 |
+ dev-python/flask-cors[${PYTHON_MULTI_USEDEP}] |
173 |
+ ) |
174 |
+ ')" |
175 |
+BDEPEND=" |
176 |
+ $(python_gen_cond_dep ' |
177 |
+ dev-python/sphinx[${PYTHON_MULTI_USEDEP}] |
178 |
+ ')" |
179 |
|
180 |
-RESTRICT="test" # tests broken in 1.4.3 already |
181 |
+DOCS=( README.rst docs/changelog.rst ) |
182 |
|
183 |
-S="${WORKDIR}/${MY_P}" |
184 |
+distutils_enable_tests pytest |
185 |
|
186 |
python_prepare_all() { |
187 |
distutils-r1_python_prepare_all |
188 |
@@ -116,25 +135,41 @@ python_prepare_all() { |
189 |
|
190 |
if ! use mpd; then |
191 |
rm test/test_player.py || die |
192 |
+ rm test/test_mpdstats.py || die |
193 |
+ fi |
194 |
+ if ! use webserver; then |
195 |
+ rm test/test_web.py || die "Failed to remove test_web.py" |
196 |
+ fi |
197 |
+ if use test; then |
198 |
+ # Those test need network |
199 |
+ rm test/test_art.py || die |
200 |
+ rm test/test_discogs.py || die |
201 |
+ rm test/test_embyupdate.py || die |
202 |
+ rm test/test_lastgenre.py || die |
203 |
+ rm test/test_spotify.py || die |
204 |
+ # rm test/test_plexupdate.py |
205 |
+ rm test/test_thumbnails.py || die |
206 |
+ # Not working |
207 |
+ rm test/test_replaygain.py || die |
208 |
+ # Not working |
209 |
+ rm test/test_convert.py || die |
210 |
+ # Not working and dropped in master |
211 |
+ rm test/test_mediafile.py || die |
212 |
fi |
213 |
} |
214 |
|
215 |
python_compile_all() { |
216 |
- use doc && emake -C docs html |
217 |
-} |
218 |
- |
219 |
-python_test() { |
220 |
- cd test || die |
221 |
- if ! use webserver; then |
222 |
- rm test_web.py || die "Failed to remove test_web.py" |
223 |
- fi |
224 |
- "${EPYTHON}" testall.py || die "Testsuite failed" |
225 |
+ esetup.py build_sphinx -b man --build-dir=docs/build |
226 |
+ use doc && esetup.py build_sphinx -b html --build-dir=docs/build |
227 |
} |
228 |
|
229 |
python_install_all() { |
230 |
distutils-r1_python_install_all |
231 |
|
232 |
- doman man/beet.1 man/beetsconfig.5 |
233 |
- use doc && local HTML_DOCS=( docs/_build/html/. ) |
234 |
+ doman docs/build/man/* |
235 |
+ use doc && local HTML_DOCS=( docs/build/html/. ) |
236 |
einstalldocs |
237 |
+ |
238 |
+ "${D}$(python_get_scriptdir)/beet" completion > "${T}/beet.bashcomp" |
239 |
+ newbashcomp "${T}/beet.bashcomp" beet |
240 |
} |