1 |
commit: 741e223b6194918335e235cd43b2ce5bf6ba7f54 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Nov 15 16:59:38 2019 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Nov 15 17:27:54 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=741e223b |
7 |
|
8 |
dev-python/future: Modernize, fix tests |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
dev-python/future/future-0.17.1.ebuild | 31 ++++++++++++++++++++----------- |
13 |
1 file changed, 20 insertions(+), 11 deletions(-) |
14 |
|
15 |
diff --git a/dev-python/future/future-0.17.1.ebuild b/dev-python/future/future-0.17.1.ebuild |
16 |
index e99e2709bfa..0aee1d1a931 100644 |
17 |
--- a/dev-python/future/future-0.17.1.ebuild |
18 |
+++ b/dev-python/future/future-0.17.1.ebuild |
19 |
@@ -14,25 +14,38 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
20 |
LICENSE="MIT" |
21 |
SLOT="0" |
22 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" |
23 |
-IUSE="doc test" |
24 |
+IUSE="doc" |
25 |
|
26 |
+distutils_enable_tests pytest |
27 |
+ |
28 |
+# TODO: make numpy unconditional when it supports py3.8 |
29 |
BDEPEND=" |
30 |
dev-python/setuptools[${PYTHON_USEDEP}] |
31 |
doc? ( |
32 |
- dev-python/sphinx[${PYTHON_USEDEP}] |
33 |
- dev-python/sphinx-bootstrap-theme[${PYTHON_USEDEP}] |
34 |
+ $(python_gen_any_dep ' |
35 |
+ dev-python/sphinx[${PYTHON_USEDEP}] |
36 |
+ dev-python/sphinx-bootstrap-theme[${PYTHON_USEDEP}] |
37 |
+ ' python{2_7,3_{5,6,7}}) |
38 |
) |
39 |
test? ( |
40 |
- dev-python/numpy[${PYTHON_USEDEP}] |
41 |
- dev-python/pytest[${PYTHON_USEDEP}] |
42 |
+ $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' \ |
43 |
+ python{2_7,3_{5,6,7}}) |
44 |
) |
45 |
" |
46 |
|
47 |
-PATCHES=( |
48 |
-) |
49 |
+python_check_deps() { |
50 |
+ use doc || return 0 |
51 |
+ has_version "dev-python/sphinx[${PYTHON_USEDEP}]" && |
52 |
+ has_version "dev-python/sphinx-bootstrap-theme[${PYTHON_USEDEP}]" |
53 |
+} |
54 |
|
55 |
python_prepare_all() { |
56 |
sed -i "/'sphinx.ext.intersphinx'/d" docs/conf.py || die |
57 |
+ # tests requiring network access |
58 |
+ rm tests/test_future/test_requests.py || die |
59 |
+ sed -i -e 's:test.*request_http:_&:' \ |
60 |
+ tests/test_future/test_standard_library.py || die |
61 |
+ |
62 |
distutils-r1_python_prepare_all |
63 |
} |
64 |
|
65 |
@@ -42,7 +55,3 @@ python_compile_all() { |
66 |
HTML_DOCS=( docs/_build/html/. ) |
67 |
fi |
68 |
} |
69 |
- |
70 |
-python_test() { |
71 |
- pytest -vv || die "Tests failed under ${EPYTHON}" |
72 |
-} |