Merge remote-tracking branch 'github/pr/108'
[gentoo.git] / dev-python / py / py-1.4.29.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI="5"
6
7 PYTHON_COMPAT=( python2_7 python3_{3,4} pypy pypy3 )
8
9 inherit distutils-r1
10
11 DESCRIPTION="library with cross-python path, ini-parsing, io, code, log facilities"
12 HOMEPAGE="http://pylib.readthedocs.org/ https://pypi.python.org/pypi/py"
13 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
14
15 LICENSE="MIT"
16 SLOT="0"
17 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
18 IUSE="doc test"
19
20 RDEPEND=""
21 DEPEND="
22         dev-python/setuptools[${PYTHON_USEDEP}]
23         test? ( >=dev-python/pytest-2.4.2[${PYTHON_USEDEP}] )
24         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
25
26 python_prepare_all() {
27         sed -e 's:intersphinx_mapping:#&:' -i doc/conf.py || die
28         distutils-r1_python_prepare_all
29 }
30
31 python_compile_all() {
32         use doc && emake -C doc html
33 }
34
35 python_test() {
36         # 1 failure, test_comments, under both pypy only.
37         # Also appears the home repo has no issue tracker.
38         py.test || die "testing failed with ${EPYTHON}"
39 }
40
41 python_install_all() {
42         use doc && local HTML_DOCS=( doc/_build/html/. )
43         distutils-r1_python_install_all
44 }