1 # Copyright © 2020 Nick Bowler
2 # License GPLv2+: GNU General Public License version 2 or any later version.
3 # This is free software: you are free to change and redistribute it.
4 # There is NO WARRANTY, to the extent permitted by law.
6 # This is a modified version of the original ebuild from Gentoo GNU/Linux,
7 # covered by the following copyright and permission notice:
9 # Copyright 2019-2020 Gentoo Authors
10 # Distributed under the terms of the GNU General Public License v2
14 PYTHON_COMPAT=( python2_7 python3_{6,7} )
21 DESCRIPTION="Python bindings for the MusicBrainz NGS and the Cover Art Archive webservices"
22 HOMEPAGE="https://github.com/alastair/python-musicbrainzngs"
23 SRC_URI="https://github.com/alastair/$MY_PN/archive/v$PV.tar.gz -> $MY_P.tar.gz"
28 IUSE="doc examples test"
29 RESTRICT="!test? ( test )"
33 PATCHES="$FILESDIR/$PN-0.6-fix-test-submit.patch"
35 DEPEND="dev-python/setuptools[$PYTHON_USEDEP]
36 doc? ( dev-python/sphinx[$PYTHON_USEDEP] )"
38 python_prepare_all() {
39 # Prevent un-needed d'loading
40 sed -e "s/^ *'sphinx.ext.intersphinx'//" -i docs/conf.py || die
41 distutils-r1_python_prepare_all
44 python_compile_all() {
45 use doc && emake -C docs html
49 esetup.py test --verbosity=2
52 python_install_all() {
53 use doc && local HTML_DOCS=( docs/_build/html/. )
57 docompress -x "/usr/share/doc/$PF/examples"
60 distutils-r1_python_install_all