1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_6 )
10 DESCRIPTION="Amazon Web Services API"
11 HOMEPAGE="https://github.com/boto/boto https://pypi.org/project/boto/"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
16 KEYWORDS="amd64 arm ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
19 REQUIRED_USE="doc? ( || ( $(python_gen_useflags 'python2*') ) )"
22 dev-python/setuptools[${PYTHON_USEDEP}]
23 test? ( dev-python/nose[${PYTHON_USEDEP}] )
24 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
26 # requires Amazon Web Services keys to pass some tests
30 use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( 'python2*' )
34 "${PYTHON}" tests/test.py -v || die "Tests fail with ${EPYTHON}"
37 python_prepare_all() {
38 # Prevent un-needed d'loading
39 sed -e "s/, 'sphinx.ext.intersphinx'//" -i docs/source/conf.py || die
40 distutils-r1_python_prepare_all
43 python_compile_all() {
45 # Appease the doc build and supply a file for _static
46 # the usual emake -C docs doesn't work under this authorship
47 cd docs && mkdir source/_static || die
52 python_install_all() {
53 use doc && local HTML_DOCS=( docs/build/html/. )
54 distutils-r1_python_install_all