1 |
commit: 1bbb9680c88e4410618161f0840f3872a5ffc081 |
2 |
Author: Patrick Lauer <patrick <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Oct 28 18:42:46 2016 +0000 |
4 |
Commit: Patrick Lauer <patrick <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Oct 28 18:43:01 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1bbb9680 |
7 |
|
8 |
dev-python/nose: Fix test dependencies #598326 |
9 |
|
10 |
Package-Manager: portage-2.3.2 |
11 |
|
12 |
dev-python/nose/nose-1.3.7-r3.ebuild | 95 ++++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 95 insertions(+) |
14 |
|
15 |
diff --git a/dev-python/nose/nose-1.3.7-r3.ebuild b/dev-python/nose/nose-1.3.7-r3.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000..c960896 |
18 |
--- /dev/null |
19 |
+++ b/dev-python/nose/nose-1.3.7-r3.ebuild |
20 |
@@ -0,0 +1,95 @@ |
21 |
+# Copyright 1999-2016 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI=6 |
26 |
+ |
27 |
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy pypy3 ) |
28 |
+PYTHON_REQ_USE="threads(+)" |
29 |
+ |
30 |
+inherit distutils-r1 |
31 |
+ |
32 |
+DESCRIPTION="Unittest extension with automatic test suite discovery and easy test authoring" |
33 |
+HOMEPAGE=" |
34 |
+ https://pypi.python.org/pypi/nose |
35 |
+ http://readthedocs.org/docs/nose/ |
36 |
+ https://bitbucket.org/jpellerin/nose" |
37 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
38 |
+ |
39 |
+LICENSE="LGPL-2.1" |
40 |
+SLOT="0" |
41 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
42 |
+IUSE="doc examples test" |
43 |
+ |
44 |
+REQUIRED_USE=" |
45 |
+ doc? ( || ( $(python_gen_useflags 'python2*') ) )" |
46 |
+ |
47 |
+RDEPEND=" |
48 |
+ dev-python/coverage[${PYTHON_USEDEP}] |
49 |
+ dev-python/setuptools[${PYTHON_USEDEP}]" |
50 |
+DEPEND="${RDEPEND} |
51 |
+ doc? ( >=dev-python/sphinx-0.6[${PYTHON_USEDEP}] ) |
52 |
+ test? ( || ( $(python_gen_cond_dep 'dev-python/twisted-core[${PYTHON_USEDEP}]' python2_7) |
53 |
+ $(python_gen_cond_dep 'dev-python/twisted[${PYTHON_USEDEP}]' python2_7) ) )" |
54 |
+ |
55 |
+PATCHES=( |
56 |
+ "${FILESDIR}"/${P}-python-3.5-backport.patch |
57 |
+ |
58 |
+ # Patch against master found in an upstream PR, backported: |
59 |
+ # https://github.com/nose-devs/nose/pull/1004 |
60 |
+ "${FILESDIR}"/${P}-coverage-4.1-support.patch |
61 |
+) |
62 |
+ |
63 |
+pkg_setup() { |
64 |
+ use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( 'python2*' ) |
65 |
+} |
66 |
+ |
67 |
+python_prepare_all() { |
68 |
+ # Tests need to be converted, and they don't respect BUILD_DIR. |
69 |
+ use test && DISTUTILS_IN_SOURCE_BUILD=1 |
70 |
+ |
71 |
+ # Disable tests requiring network connection. |
72 |
+ sed \ |
73 |
+ -e "s/test_resolve/_&/g" \ |
74 |
+ -e "s/test_raises_bad_return/_&/g" \ |
75 |
+ -e "s/test_raises_twisted_error/_&/g" \ |
76 |
+ -i unit_tests/test_twisted.py || die "sed failed" |
77 |
+ # Disable versioning of nosetests script to avoid collision with |
78 |
+ # versioning performed by the eclass. |
79 |
+ sed -e "/'nosetests%s = nose:run_exit' % py_vers_tag,/d" \ |
80 |
+ -i setup.py || die "sed2 failed" |
81 |
+ |
82 |
+ # Prevent un-needed d'loading during doc build |
83 |
+ sed -e "s/, 'sphinx.ext.intersphinx'//" -i doc/conf.py || die |
84 |
+ |
85 |
+ distutils-r1_python_prepare_all |
86 |
+} |
87 |
+ |
88 |
+python_compile() { |
89 |
+ local add_targets=() |
90 |
+ |
91 |
+ if use test; then |
92 |
+ add_targets+=( egg_info ) |
93 |
+ python_is_python3 && add_targets+=( build_tests ) |
94 |
+ fi |
95 |
+ |
96 |
+ distutils-r1_python_compile ${add_targets[@]} |
97 |
+} |
98 |
+ |
99 |
+python_compile_all() { |
100 |
+ use doc && emake -C doc html |
101 |
+} |
102 |
+ |
103 |
+python_test() { |
104 |
+ "${PYTHON}" selftest.py -v || die "Tests fail with ${EPYTHON}" |
105 |
+} |
106 |
+ |
107 |
+python_install() { |
108 |
+ distutils-r1_python_install --install-data "${EPREFIX}/usr/share" |
109 |
+} |
110 |
+ |
111 |
+python_install_all() { |
112 |
+ use examples && dodoc -r examples |
113 |
+ use doc && HTML_DOCS=( doc/.build/html/. ) |
114 |
+ distutils-r1_python_install_all |
115 |
+} |