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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Apr 4 18:05:36 2015 UTC (5 years, 4 months ago) by jlec
Branch: MAIN
CVS Tags: HEAD
Version BUmp

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

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

  ViewVC Help
Powered by ViewVC 1.1.20