Merge branch 'zasdfgbnm-master'
[gentoo.git] / dev-python / pychroot / pychroot-9999.ebuild
1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 PYTHON_COMPAT=( python{2_7,3_3,3_4,3_5} )
7 inherit distutils-r1
8
9 if [[ ${PV} == *9999 ]] ; then
10         EGIT_REPO_URI="https://github.com/pkgcore/pychroot.git"
11         inherit git-r3
12 else
13         KEYWORDS="~amd64 ~x86"
14         SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
15 fi
16
17 DESCRIPTION="a python library and cli tool that simplify chroot handling"
18 HOMEPAGE="https://github.com/pkgcore/pychroot"
19
20 LICENSE="BSD"
21 SLOT="0"
22 IUSE="test"
23
24 RDEPEND="
25         dev-python/setuptools[${PYTHON_USEDEP}]
26         =dev-python/snakeoil-9999[${PYTHON_USEDEP}]
27 "
28 DEPEND="${RDEPEND}
29         $(python_gen_cond_dep 'dev-python/3to2[${PYTHON_USEDEP}]' python2_7)
30         test? (
31                 $(python_gen_cond_dep 'dev-python/mock[${PYTHON_USEDEP}]' python2_7)
32                 dev-python/pytest[${PYTHON_USEDEP}]
33         )"
34 [[ ${PV} == *9999 ]] && DEPEND+=" dev-python/sphinx[${PYTHON_USEDEP}]"
35
36 python_compile_all() {
37         [[ ${PV} == *9999 ]] && emake -C doc man
38 }
39
40 python_test() {
41         esetup.py test
42 }
43
44 python_install_all() {
45         distutils-r1_python_install_all
46         if [[ ${PV} == *9999 ]]; then
47                 emake -C doc PREFIX=/usr DESTDIR="${D}" install_man
48         else
49                 doman man/*
50         fi
51 }