*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / libcloud / libcloud-0.15.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 # py3 dropped due to failing tests once lockfile installed
7 PYTHON_COMPAT=( python2_7 )
8 PYTHON_REQ_USE="ssl(+)"
9
10 inherit distutils-r1
11
12 DESCRIPTION="Unified Interface to the Cloud - python support libs"
13 HOMEPAGE="http://libcloud.apache.org/index.html"
14 SRC_URI="mirror://apache/${PN}/apache-${P}.tar.bz2"
15
16 LICENSE="Apache-2.0"
17 SLOT="0"
18 KEYWORDS="amd64 x86"
19 IUSE="examples test"
20 RESTRICT="!test? ( test )"
21
22 RDEPEND=""
23 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
24         test? (
25                 dev-python/mock[${PYTHON_USEDEP}]
26                 dev-python/lockfile[${PYTHON_USEDEP}]
27         )"
28
29 S="${WORKDIR}/apache-${P}"
30
31 python_prepare_all() {
32         if use examples; then
33                 mkdir examples
34                 mv example_*.py examples || die
35         fi
36         distutils-r1_python_prepare_all
37 }
38
39 src_test() {
40         cp libcloud/test/secrets.py-dist libcloud/test/secrets.py || die
41         distutils-r1_src_test
42 }
43
44 python_test() {
45         esetup.py test
46 }
47
48 python_install_all() {
49         use examples && local EXAMPLES=( examples/. )
50         distutils-r1_python_install_all
51 }