4 |
4 |
EAPI=8
|
5 |
5 |
|
6 |
6 |
DISTUTILS_SINGLE_IMPL=1
|
7 |
|
DISTUTILS_USE_PEP517=setuptools
|
8 |
|
PYTHON_COMPAT=( python3_{10..12} )
|
|
7 |
DISTUTILS_USE_PEP517=poetry
|
|
8 |
PYTHON_COMPAT=( python3_{11..13} )
|
9 |
9 |
PYTHON_REQ_USE="sqlite"
|
10 |
10 |
|
11 |
11 |
# These envvars are used to treat github tarball builds differently
|
... | ... | |
13 |
13 |
: ${IS_VCS_SOURCE="no"}
|
14 |
14 |
: ${UPDATE_VERSION="no"}
|
15 |
15 |
|
16 |
|
inherit distutils-r1 bash-completion-r1 multiprocessing optfeature
|
|
16 |
inherit distutils-r1 multiprocessing optfeature shell-completion
|
17 |
17 |
|
18 |
18 |
if [[ ${PV} == "9999" ]]; then
|
19 |
19 |
EGIT_REPO_URI="https://github.com/beetbox/beets.git"
|
20 |
|
inherit git-r3
|
21 |
|
else
|
22 |
|
MY_COMMIT=c75f07a0da6c622d3cd0f5aad0a08edaea360dad
|
23 |
|
# This should be set to 1 if we're not sourcing tarballs from pypi; we need to generate mans.
|
24 |
20 |
IS_VCS_SOURCE="yes"
|
25 |
21 |
UPDATE_VERSION="yes"
|
26 |
|
SRC_URI="https://github.com/beetbox/beets/archive/${MY_COMMIT}.tar.gz -> ${P}.gh.tar.gz"
|
27 |
|
KEYWORDS="amd64 ~x86"
|
28 |
|
S="${WORKDIR}/${PN}-${MY_COMMIT}"
|
|
22 |
inherit git-r3
|
|
23 |
else
|
|
24 |
inherit pypi
|
|
25 |
MY_PV=${PV/_beta/-beta.}
|
|
26 |
MY_P=${PN}-${MY_PV}
|
|
27 |
KEYWORDS="~amd64"
|
|
28 |
S="${WORKDIR}/${MY_P}"
|
29 |
29 |
fi
|
30 |
30 |
|
31 |
31 |
DESCRIPTION="Media library management system for obsessive music geeks"
|
... | ... | |
39 |
39 |
RDEPEND="
|
40 |
40 |
$(python_gen_cond_dep '
|
41 |
41 |
>=dev-python/jellyfish-0.7.1[${PYTHON_USEDEP}]
|
42 |
|
dev-python/munkres[${PYTHON_USEDEP}]
|
43 |
42 |
>=media-libs/mutagen-1.33[${PYTHON_USEDEP}]
|
44 |
43 |
>=dev-python/musicbrainzngs-0.4[${PYTHON_USEDEP}]
|
45 |
|
dev-python/pyyaml[${PYTHON_USEDEP}]
|
46 |
44 |
dev-python/confuse[${PYTHON_USEDEP}]
|
|
45 |
>=dev-python/lap-0.5.12[${PYTHON_USEDEP}]
|
47 |
46 |
dev-python/mediafile[${PYTHON_USEDEP}]
|
|
47 |
>=dev-python/numpy-1.24.4[${PYTHON_USEDEP}]
|
|
48 |
dev-python/pyyaml[${PYTHON_USEDEP}]
|
48 |
49 |
dev-python/reflink[${PYTHON_USEDEP}]
|
49 |
50 |
dev-python/requests-oauthlib[${PYTHON_USEDEP}]
|
50 |
51 |
dev-python/requests[${PYTHON_USEDEP}]
|
... | ... | |
64 |
65 |
dev-db/sqlite[icu]
|
65 |
66 |
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
|
66 |
67 |
dev-python/bluelet[${PYTHON_USEDEP}]
|
|
68 |
dev-python/dbus-python[${PYTHON_USEDEP}]
|
67 |
69 |
dev-python/python3-discogs-client[${PYTHON_USEDEP}]
|
68 |
70 |
dev-python/flask[${PYTHON_USEDEP}]
|
69 |
71 |
dev-python/mock[${PYTHON_USEDEP}]
|
70 |
72 |
dev-python/pyacoustid[${PYTHON_USEDEP}]
|
71 |
73 |
dev-python/pylast[${PYTHON_USEDEP}]
|
72 |
74 |
dev-python/pygobject:3[${PYTHON_USEDEP}]
|
|
75 |
dev-python/pytest-flask[${PYTHON_USEDEP}]
|
73 |
76 |
dev-python/python-mpd2[${PYTHON_USEDEP}]
|
74 |
77 |
dev-python/pyxdg[${PYTHON_USEDEP}]
|
75 |
78 |
dev-python/reflink[${PYTHON_USEDEP}]
|
... | ... | |
78 |
81 |
media-gfx/imagemagick
|
79 |
82 |
)
|
80 |
83 |
dev-python/rarfile[${PYTHON_USEDEP}]
|
|
84 |
dev-python/requests-mock[${PYTHON_USEDEP}]
|
81 |
85 |
dev-python/responses[${PYTHON_USEDEP}]
|
82 |
86 |
dev-python/wheel[${PYTHON_USEDEP}]
|
83 |
87 |
media-libs/chromaprint[tools]
|
... | ... | |
107 |
111 |
distutils_enable_tests pytest
|
108 |
112 |
|
109 |
113 |
src_prepare() {
|
110 |
|
# https://github.com/beetbox/beets/commit/8b4983fe7cae9397acd3e23602e419d8dc1041d4
|
111 |
|
# merged code coverage into standard test runs; since we disable coverage globally
|
112 |
|
# we need to sed out some 'addopts' for coverage in setup.cfg that cause tests to choke.
|
113 |
|
sed -i -e "/--cov=beets/,+9d" setup.cfg || die "Failed to disable code coverage options in setup.cfg"
|
114 |
|
# Update the version if we're not building from pypy; it's probably a _pre or live ebuild.
|
115 |
114 |
if [[ ${PV} == "9999" ]] || [[ ${UPDATE_VERSION} == "yes" ]]; then
|
116 |
|
sed -i -e "s/version=\".*\"/version=\"${PV}\"/" setup.py || die "Failed to update version in VCS sources"
|
|
115 |
sed -i -e "s/^version = \".*\"$/version = \"${PV}\"/" \
|
|
116 |
pyproject.toml \
|
|
117 |
|| die "Failed to update version in VCS sources"
|
117 |
118 |
sed -i -e "s/__version__ = \".*\"/__version__ = \"${PV}\"/" beets/__init__.py
|
118 |
119 |
fi
|
119 |
120 |
default
|
... | ... | |
139 |
140 |
}
|
140 |
141 |
|
141 |
142 |
python_test() {
|
142 |
|
# https://github.com/beetbox/beets/issues/5243 testing bash completions is broken.
|
143 |
|
local EPYTEST_DESELECT=(
|
144 |
|
test/test_ui.py::CompletionTest::test_completion
|
145 |
|
)
|
|
143 |
# test/test_art_resize.py can be flaky, parallelisation?
|
146 |
144 |
epytest -n$(makeopts_jobs) -v
|
147 |
145 |
}
|
148 |
146 |
|
... | ... | |
155 |
153 |
# Generate the bash completions; we'll set PYTHONPATH for this invocation so that beets can start.
|
156 |
154 |
PYTHONPATH="${ED}/usr/lib/${PYTHON}:$PYTHONPATH" ${PYTHON} "${ED}/usr/bin/beet" completion > "${T}/beet.bash" || die
|
157 |
155 |
newbashcomp "${T}/beet.bash" beet
|
158 |
|
insinto /usr/share/zsh/site-functions
|
159 |
|
newins "${S}/extra/_beet" _beet
|
|
156 |
newzshcomp "${S}/extra/_beet" _beet
|
160 |
157 |
|
161 |
158 |
optfeature "badfiles support" "media-libs/flac media-sound/mp3val"
|
162 |
159 |
optfeature "chromaprint support" "dev-python/pyacoustid media-libs/chromaprint[tools]"
|
... | ... | |
171 |
168 |
optfeature "thumbnail support" dev-python/pyxdg "dev-python/pillow media-gfx/imagemagick"
|
172 |
169 |
optfeature "webserver support" dev-python/flask
|
173 |
170 |
optfeature "webserver cors support" dev-python/flask-cors
|
|
171 |
optfeature "Amarok metadata synchronisation" dev-python/dbus-python
|
174 |
172 |
}
|