*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / botocore / botocore-9999.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( python2_7 python3_6 python3_7 )
6
7 inherit distutils-r1
8
9 DESCRIPTION="Low-level, data-driven core of boto 3."
10 HOMEPAGE="https://github.com/boto/botocore"
11 LICENSE="Apache-2.0"
12 SLOT="0"
13 IUSE="doc test"
14 RESTRICT="!test? ( test )"
15
16 if [[ "${PV}" == "9999" ]]; then
17         EGIT_REPO_URI="https://github.com/boto/botocore"
18         inherit git-r3
19 else
20         SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
21         KEYWORDS="~amd64 ~arm64 ~x86 ~amd64-linux ~x86-linux"
22 fi
23
24 RDEPEND="
25         dev-python/docutils[${PYTHON_USEDEP}]
26         dev-python/jmespath[${PYTHON_USEDEP}]
27         dev-python/python-dateutil[${PYTHON_USEDEP}]
28         dev-python/urllib3[${PYTHON_USEDEP}]
29 "
30 DEPEND="
31         dev-python/setuptools[${PYTHON_USEDEP}]
32         doc? (
33                 dev-python/guzzle_sphinx_theme[${PYTHON_USEDEP}]
34                 dev-python/sphinx[${PYTHON_USEDEP}]
35         )
36         test? (
37                 ${RDEPEND}
38                 dev-python/mock[${PYTHON_USEDEP}]
39                 dev-python/nose[${PYTHON_USEDEP}]
40                 dev-python/jsonschema[${PYTHON_USEDEP}]
41         )
42 "
43
44 PATCHES=( "${FILESDIR}/1.8.6-tests-pass-all-env-vars-to-cmd-runner.patch" )
45
46 python_compile_all() {
47         use doc && emake -C docs html
48 }
49
50 python_test() {
51         PYTHONPATH="${BUILD_DIR}/lib" nosetests -v tests/unit || die "unit tests failed under ${EPYTHON}"
52         PYTHONPATH="${BUILD_DIR}/lib" nosetests -v tests/functional || die "functional tests failed under ${EPYTHON}"
53 }
54
55 python_install_all() {
56         use doc && local HTML_DOCS=( docs/build/html/. )
57
58         distutils-r1_python_install_all
59 }