1 |
commit: 28615dc8cd1e943d73501c542c0a0cef73efd403 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 5 12:27:16 2021 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 5 12:27:16 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=28615dc8 |
7 |
|
8 |
dev-python/nose: Remove transitive coverage dep entirely |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/nose/nose-1.3.7-r8.ebuild | 80 ++++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 80 insertions(+) |
14 |
|
15 |
diff --git a/dev-python/nose/nose-1.3.7-r8.ebuild b/dev-python/nose/nose-1.3.7-r8.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000000..993e38c0599 |
18 |
--- /dev/null |
19 |
+++ b/dev-python/nose/nose-1.3.7-r8.ebuild |
20 |
@@ -0,0 +1,80 @@ |
21 |
+# Copyright 1999-2021 Gentoo Authors |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=7 |
25 |
+ |
26 |
+PYTHON_COMPAT=( python3_{7..9} pypy3 ) |
27 |
+PYTHON_REQ_USE="threads(+)" |
28 |
+inherit distutils-r1 |
29 |
+ |
30 |
+DESCRIPTION="Unittest extension with automatic test suite discovery and easy test authoring" |
31 |
+HOMEPAGE=" |
32 |
+ https://pypi.org/project/nose/ |
33 |
+ https://nose.readthedocs.io/en/latest/ |
34 |
+ https://github.com/nose-devs/nose" |
35 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
36 |
+ |
37 |
+LICENSE="LGPL-2.1" |
38 |
+SLOT="0" |
39 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
40 |
+IUSE="examples test" |
41 |
+RESTRICT="!test? ( test )" |
42 |
+ |
43 |
+DEPEND="${RDEPEND} |
44 |
+ test? ( |
45 |
+ !hppa? ( dev-python/coverage[${PYTHON_USEDEP}] ) |
46 |
+ $(python_gen_cond_dep ' |
47 |
+ dev-python/twisted[${PYTHON_USEDEP}] |
48 |
+ ' 'python3*') |
49 |
+ )" |
50 |
+ |
51 |
+PATCHES=( |
52 |
+ "${FILESDIR}"/${P}-python-3.5-backport.patch |
53 |
+ |
54 |
+ # Patch against master found in an upstream PR, backported: |
55 |
+ # https://github.com/nose-devs/nose/pull/1004 |
56 |
+ "${FILESDIR}"/${P}-coverage-4.1-support.patch |
57 |
+ |
58 |
+ "${FILESDIR}"/${P}-python-3.6-test.patch |
59 |
+) |
60 |
+ |
61 |
+python_prepare_all() { |
62 |
+ # Tests need to be converted, and they don't respect BUILD_DIR. |
63 |
+ use test && DISTUTILS_IN_SOURCE_BUILD=1 |
64 |
+ |
65 |
+ # Disable tests requiring network connection. |
66 |
+ sed \ |
67 |
+ -e "s/test_resolve/_&/g" \ |
68 |
+ -e "s/test_raises_bad_return/_&/g" \ |
69 |
+ -e "s/test_raises_twisted_error/_&/g" \ |
70 |
+ -i unit_tests/test_twisted.py || die "sed failed" |
71 |
+ # Disable versioning of nosetests script to avoid collision with |
72 |
+ # versioning performed by the eclass. |
73 |
+ sed -e "/'nosetests%s = nose:run_exit' % py_vers_tag,/d" \ |
74 |
+ -i setup.py || die "sed2 failed" |
75 |
+ |
76 |
+ # fix manpage install path |
77 |
+ sed -i -e 's:man/:share/&:' setup.py || die |
78 |
+ |
79 |
+ distutils-r1_python_prepare_all |
80 |
+} |
81 |
+ |
82 |
+python_compile() { |
83 |
+ local add_targets=() |
84 |
+ |
85 |
+ if use test; then |
86 |
+ add_targets+=( egg_info ) |
87 |
+ python_is_python3 && add_targets+=( build_tests ) |
88 |
+ fi |
89 |
+ |
90 |
+ distutils-r1_python_compile "${add_targets[@]}" |
91 |
+} |
92 |
+ |
93 |
+python_test() { |
94 |
+ "${EPYTHON}" selftest.py -v || die "Tests fail with ${EPYTHON}" |
95 |
+} |
96 |
+ |
97 |
+python_install_all() { |
98 |
+ use examples && dodoc -r examples |
99 |
+ distutils-r1_python_install_all |
100 |
+} |