1 |
commit: 3aee206f2ec579762a7f7b755bc9170465aef183 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 27 21:44:29 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Sep 28 15:52:46 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3aee206f |
7 |
|
8 |
dev-python/nose: Remove py2.7 in revbump |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/nose/nose-1.3.7-r7.ebuild | 86 ++++++++++++++++++++++++++++++++++++ |
13 |
1 file changed, 86 insertions(+) |
14 |
|
15 |
diff --git a/dev-python/nose/nose-1.3.7-r7.ebuild b/dev-python/nose/nose-1.3.7-r7.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000000..f72c21ba252 |
18 |
--- /dev/null |
19 |
+++ b/dev-python/nose/nose-1.3.7-r7.ebuild |
20 |
@@ -0,0 +1,86 @@ |
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=( python3_{6..9} 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 ~riscv 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? ( |
47 |
+ dev-python/coverage[${PYTHON_USEDEP}] |
48 |
+ )" |
49 |
+DEPEND="${RDEPEND} |
50 |
+ test? ( |
51 |
+ dev-python/coverage[${PYTHON_USEDEP}] |
52 |
+ $(python_gen_cond_dep ' |
53 |
+ dev-python/twisted[${PYTHON_USEDEP}] |
54 |
+ ' 'python3*') |
55 |
+ )" |
56 |
+ |
57 |
+PATCHES=( |
58 |
+ "${FILESDIR}"/${P}-python-3.5-backport.patch |
59 |
+ |
60 |
+ # Patch against master found in an upstream PR, backported: |
61 |
+ # https://github.com/nose-devs/nose/pull/1004 |
62 |
+ "${FILESDIR}"/${P}-coverage-4.1-support.patch |
63 |
+ |
64 |
+ "${FILESDIR}"/${P}-python-3.6-test.patch |
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 |
+ # fix manpage install path |
83 |
+ sed -i -e 's:man/:share/&:' setup.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_test() { |
100 |
+ "${EPYTHON}" selftest.py -v || die "Tests fail with ${EPYTHON}" |
101 |
+} |
102 |
+ |
103 |
+python_install_all() { |
104 |
+ use examples && dodoc -r examples |
105 |
+ distutils-r1_python_install_all |
106 |
+} |