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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Sat Apr 4 20:12:11 2015 UTC (5 years, 3 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +2 -2 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-9999.ebuild,v 1.10 2014/11/19 15:14:59 idella4 Exp $
4
5 EAPI=5
6
7 #if LIVE
8 EGIT_REPO_URI="git://github.com/nose-devs/${PN}.git
9 https://github.com/nose-devs/${PN}.git"
10 inherit git-2
11 #endif
12
13 PYTHON_COMPAT=( python{2_7,3_3,3_4} pypy pypy3 )
14 inherit distutils-r1 eutils
15
16 DESCRIPTION="A unittest extension offering automatic test suite discovery and easy test authoring"
17 HOMEPAGE="http://pypi.python.org/pypi/nose http://readthedocs.org/docs/nose/ https://github.com/nose-devs/nose"
18 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
19
20 LICENSE="LGPL-2.1"
21 SLOT="0"
22 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"
23 IUSE="doc examples test"
24
25 RDEPEND="dev-python/coverage[${PYTHON_USEDEP}]
26 dev-python/setuptools[${PYTHON_USEDEP}]"
27 DEPEND="${RDEPEND}
28 doc? ( >=dev-python/sphinx-0.6 )
29 test? ( dev-python/twisted-core )"
30
31 #if LIVE
32 SRC_URI=
33 KEYWORDS=
34 #endif
35
36 DOCS=( AUTHORS )
37
38 python_prepare_all() {
39 # Tests need to be converted, and they don't respect BUILD_DIR.
40 use test && DISTUTILS_IN_SOURCE_BUILD=1
41
42 # Disable sphinx.ext.intersphinx, requires network
43 epatch "${FILESDIR}/${PN}-0.11.0-disable_intersphinx.patch"
44 # Disable tests requiring network connection.
45 sed \
46 -e "s/test_resolve/_&/g" \
47 -e "s/test_raises_bad_return/_&/g" \
48 -e "s/test_raises_twisted_error/_&/g" \
49 -i unit_tests/test_twisted.py || die "sed failed"
50 # Disable versioning of nosetests script to avoid collision with
51 # versioning performed by the eclass.
52 sed -e "/'nosetests%s = nose:run_exit' % py_vers_tag,/d" \
53 -i setup.py || die "sed2 failed"
54
55 distutils-r1_python_prepare_all
56 }
57
58 python_compile() {
59 local add_targets=()
60
61 if use test; then
62 add_targets+=( egg_info )
63 [[ ${EPYTHON} == python3* ]] && add_targets+=( build_tests )
64 fi
65
66 distutils-r1_python_compile ${add_targets[@]}
67 }
68
69 python_compile_all() {
70 use doc && emake -C doc html
71 }
72
73 src_test() {
74 # nosetests use heavy multiprocessing during the tests.
75 # this shall make them less likely to kill your system or timeout.
76 local DISTUTILS_NO_PARALLEL_BUILD=1
77
78 distutils-r1_src_test
79 }
80
81 python_test() {
82 "${PYTHON}" selftest.py || die "Tests fail with ${EPYTHON}"
83 }
84
85 python_install() {
86 distutils-r1_python_install --install-data "${EPREFIX}/usr/share"
87 }
88
89 python_install_all() {
90 local EXAMPLES=( examples/. )
91 distutils-r1_python_install_all
92
93 if use doc; then
94 dohtml -r -A txt doc/.build/html/.
95 fi
96 }

  ViewVC Help
Powered by ViewVC 1.1.20