/[gentoo-x86]/dev-python/pytest/pytest-2.6.3.ebuild
Gentoo

Contents of /dev-python/pytest/pytest-2.6.3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Fri Oct 31 16:09:09 2014 UTC (6 years ago) by ago
Branch: MAIN
Changes since 1.6: +2 -2 lines
Stable for ppc64, wrt bug #524416

(Portage version: 2.2.8-r2/cvs/Linux x86_64, RepoMan options: --include-arches="ppc64", signed Manifest commit with key 7194459F)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-python/pytest/pytest-2.6.3.ebuild,v 1.6 2014/10/18 14:41:52 ago Exp $
4
5 EAPI="5"
6
7 PYTHON_COMPAT=( python{2_7,3_2,3_3,3_4} pypy )
8 inherit distutils-r1 eutils
9
10 DESCRIPTION="py.test: simple powerful testing with Python"
11 HOMEPAGE="http://pytest.org/ http://pypi.python.org/pypi/pytest"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13
14 LICENSE="MIT"
15 SLOT="0"
16 KEYWORDS="~alpha amd64 arm hppa ~ia64 ~mips ppc ppc64 ~s390 ~sh ~sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
17 IUSE="doc test"
18
19 # When bumping, please check setup.py for the proper py version
20 PY_VER="1.4.25"
21 RDEPEND=">=dev-python/py-${PY_VER}[${PYTHON_USEDEP}]"
22
23 #pexpect dep based on https://bitbucket.org/hpk42/pytest/issue/386/tests-fail-with-pexpect-30
24 DEPEND="${RDEPEND}
25 dev-python/setuptools[${PYTHON_USEDEP}]
26 test? (
27 $(python_gen_cond_dep 'dev-python/pexpect[${PYTHON_USEDEP}]' 'python*')
28 dev-python/pyyaml[${PYTHON_USEDEP}]
29 )
30 doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
31
32 python_prepare_all() {
33 # Disable versioning of py.test script to avoid collision with
34 # versioning performed by the eclass.
35 sed -e "s/return points/return {'py.test': target}/" -i setup.py || die "sed failed"
36 grep -qF "py>=${PY_VER}" setup.py || die "Incorrect dev-python/py dependency"
37
38 # Prevent un-needed d'loading
39 sed -e "s/'sphinx.ext.intersphinx', //" -i doc/en/conf.py || die
40 distutils-r1_python_prepare_all
41 }
42
43 python_compile_all() {
44 if use doc; then
45 mkdir doc/en/.build || die
46 emake -C doc/en html
47 fi
48 }
49
50 python_test() {
51 "${PYTHON}" "${BUILD_DIR}"/lib/pytest.py \
52 --ignore=doc/en/example/nonpython/test_simple.yml \
53 || die "tests failed with ${EPYTHON}"
54 }
55
56 python_install_all() {
57 use doc && dohtml -r doc/en/_build/html/
58 distutils-r1_python_install_all
59 }

  ViewVC Help
Powered by ViewVC 1.1.20