/[gentoo-x86]/dev-python/nose/nose-1.3.4.ebuild
Gentoo

Contents of /dev-python/nose/nose-1.3.4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Sat Apr 4 20:12:11 2015 UTC (5 years, 4 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +3 -3 lines
Mark arm64/s390/sh stable.

(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key D2E96200)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-python/nose/nose-1.3.4.ebuild,v 1.11 2014/12/01 09:45:02 ago Exp $
4
5 EAPI=5
6
7 PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy pypy3 )
8 inherit distutils-r1
9
10 DESCRIPTION="A unittest extension offering automatic test suite discovery and easy test authoring"
11 HOMEPAGE="http://pypi.python.org/pypi/nose http://readthedocs.org/docs/nose/ https://bitbucket.org/jpellerin/nose"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13
14 LICENSE="LGPL-2.1"
15 SLOT="0"
16 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
17 IUSE="doc examples test"
18
19 RDEPEND="dev-python/coverage[${PYTHON_USEDEP}]
20 dev-python/setuptools[${PYTHON_USEDEP}]"
21 DEPEND="${RDEPEND}
22 doc? ( >=dev-python/sphinx-0.6[${PYTHON_USEDEP}] )
23 test? ( $(python_gen_cond_dep 'dev-python/twisted-core[${PYTHON_USEDEP}]' python2_7) )"
24
25 python_prepare_all() {
26 # Tests need to be converted, and they don't respect BUILD_DIR.
27 use test && DISTUTILS_IN_SOURCE_BUILD=1
28
29 # Disable tests requiring network connection.
30 sed \
31 -e "s/test_resolve/_&/g" \
32 -e "s/test_raises_bad_return/_&/g" \
33 -e "s/test_raises_twisted_error/_&/g" \
34 -i unit_tests/test_twisted.py || die "sed failed"
35 # Disable versioning of nosetests script to avoid collision with
36 # versioning performed by the eclass.
37 sed -e "/'nosetests%s = nose:run_exit' % py_vers_tag,/d" \
38 -i setup.py || die "sed2 failed"
39
40 # Prevent un-needed d'loading during doc build
41 sed -e "s/, 'sphinx.ext.intersphinx'//" -i doc/conf.py || die
42
43 distutils-r1_python_prepare_all
44 }
45
46 python_compile() {
47 local add_targets=()
48
49 if use test; then
50 add_targets+=( egg_info )
51 python_is_python3 && add_targets+=( build_tests )
52 fi
53
54 distutils-r1_python_compile ${add_targets[@]}
55 }
56
57 python_compile_all() {
58 use doc && emake -C doc html
59 }
60
61 src_test() {
62 # nosetests use heavy multiprocessing during the tests.
63 # this shall make them less likely to kill your system or timeout.
64 local DISTUTILS_NO_PARALLEL_BUILD=1
65
66 distutils-r1_src_test
67 }
68
69 python_test() {
70 "${PYTHON}" selftest.py -v || die "Tests fail with ${EPYTHON}"
71 }
72
73 python_install() {
74 distutils-r1_python_install --install-data "${EPREFIX}/usr/share"
75 }
76
77 python_install_all() {
78 use examples && local EXAMPLES=( examples/. )
79 distutils-r1_python_install_all
80
81 if use doc; then
82 dohtml -r -A txt doc/.build/html/.
83 fi
84 }

  ViewVC Help
Powered by ViewVC 1.1.20