1 |
commit: e2298f42597ba7981d8f7c22618a59cfd9755d76 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon May 25 12:38:20 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon May 25 12:44:33 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e2298f42 |
7 |
|
8 |
dev-python/nose: Clean py27-requiring docs up |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/nose/nose-1.3.7-r5.ebuild | 81 ++++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 81 insertions(+) |
14 |
|
15 |
diff --git a/dev-python/nose/nose-1.3.7-r5.ebuild b/dev-python/nose/nose-1.3.7-r5.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000000..8ce50a05b18 |
18 |
--- /dev/null |
19 |
+++ b/dev-python/nose/nose-1.3.7-r5.ebuild |
20 |
@@ -0,0 +1,81 @@ |
21 |
+# Copyright 1999-2020 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=7 |
25 |
+ |
26 |
+DISTUTILS_USE_SETUPTOOLS=rdepend |
27 |
+PYTHON_COMPAT=( python2_7 python3_{6,7,8} 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.org/project/nose/ |
35 |
+ https://nose.readthedocs.io/en/latest/ |
36 |
+ https://github.com/nose-devs/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 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
42 |
+IUSE="coverage examples test" |
43 |
+RESTRICT="!test? ( test )" |
44 |
+ |
45 |
+RDEPEND=" |
46 |
+ coverage? ( dev-python/coverage[${PYTHON_USEDEP}] )" |
47 |
+DEPEND="${RDEPEND} |
48 |
+ test? ( |
49 |
+ dev-python/coverage[${PYTHON_USEDEP}] |
50 |
+ $(python_gen_cond_dep ' |
51 |
+ dev-python/twisted[${PYTHON_USEDEP}] |
52 |
+ ' python2_7 python3_{6,7,8}) |
53 |
+ )" |
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 |
+ "${FILESDIR}"/${P}-python-3.6-test.patch |
63 |
+) |
64 |
+ |
65 |
+python_prepare_all() { |
66 |
+ # Tests need to be converted, and they don't respect BUILD_DIR. |
67 |
+ use test && DISTUTILS_IN_SOURCE_BUILD=1 |
68 |
+ |
69 |
+ # Disable tests requiring network connection. |
70 |
+ sed \ |
71 |
+ -e "s/test_resolve/_&/g" \ |
72 |
+ -e "s/test_raises_bad_return/_&/g" \ |
73 |
+ -e "s/test_raises_twisted_error/_&/g" \ |
74 |
+ -i unit_tests/test_twisted.py || die "sed failed" |
75 |
+ # Disable versioning of nosetests script to avoid collision with |
76 |
+ # versioning performed by the eclass. |
77 |
+ sed -e "/'nosetests%s = nose:run_exit' % py_vers_tag,/d" \ |
78 |
+ -i setup.py || die "sed2 failed" |
79 |
+ |
80 |
+ distutils-r1_python_prepare_all |
81 |
+} |
82 |
+ |
83 |
+python_compile() { |
84 |
+ local add_targets=() |
85 |
+ |
86 |
+ if use test; then |
87 |
+ add_targets+=( egg_info ) |
88 |
+ python_is_python3 && add_targets+=( build_tests ) |
89 |
+ fi |
90 |
+ |
91 |
+ distutils-r1_python_compile "${add_targets[@]}" |
92 |
+} |
93 |
+ |
94 |
+python_test() { |
95 |
+ "${EPYTHON}" selftest.py -v || die "Tests fail with ${EPYTHON}" |
96 |
+} |
97 |
+ |
98 |
+python_install_all() { |
99 |
+ use examples && dodoc -r examples |
100 |
+ distutils-r1_python_install_all |
101 |
+} |