blob: b77542b9ba825010b737ee18625efbb075fd1fac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..11} )
inherit distutils-r1 pypi
DESCRIPTION="Python bindings for Chromaprint and the AcoustID web service"
HOMEPAGE="https://pypi.org/project/pyacoustid/"
SRC_URI+="
test? (
https://s3.wasabisys.com/blocsonic/releases/maxblocs/bsmx0198/01-Follow_192kb.mp3
-> ${PN}-test.mp3
)
"
LICENSE="MIT test? ( CC-BY-SA-4.0 )"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="examples test"
# Tests fail with network-sandbox, since they need to connect to acoustid.org
PROPERTIES="test_network"
RESTRICT="test"
RDEPEND="
dev-python/audioread[${PYTHON_USEDEP},ffmpeg]
dev-python/requests[${PYTHON_USEDEP}]
media-libs/chromaprint
"
python_test() {
# Working test will print the top metadata match from Acoustid's database.
"${EPYTHON}" aidmatch.py "${DISTDIR}/${PN}-test.mp3" || die "Test failed with ${EPYTHON}"
}
src_install() {
distutils-r1_src_install
if use examples ; then
docinto examples
dodoc aidmatch.py fpcalc.py
docompress -x /usr/share/doc/${PF}/examples/
fi
}
|