Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/bpython/
Date: Wed, 03 Jun 2020 17:28:04
Message-Id: 1591205276.993386b0a18dd0a184f2102dfc8d1a5bc6f223fb.mgorny@gentoo
1 commit: 993386b0a18dd0a184f2102dfc8d1a5bc6f223fb
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jun 3 17:25:09 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Jun 3 17:27:56 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=993386b0
7
8 dev-python/bpython: Fix tests
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/bpython/bpython-0.19.ebuild | 32 ++++++++++----------------------
13 1 file changed, 10 insertions(+), 22 deletions(-)
14
15 diff --git a/dev-python/bpython/bpython-0.19.ebuild b/dev-python/bpython/bpython-0.19.ebuild
16 index 178c7afd56d..9e264fef8f6 100644
17 --- a/dev-python/bpython/bpython-0.19.ebuild
18 +++ b/dev-python/bpython/bpython-0.19.ebuild
19 @@ -27,31 +27,19 @@ RDEPEND="
20 dev-python/urwid[${PYTHON_USEDEP}]
21 dev-python/watchdog[${PYTHON_USEDEP}]
22 "
23 -DEPEND="${RDEPEND}
24 - doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
25 +# sphinx is used implicitly to build manpages
26 +BDEPEND="
27 + dev-python/sphinx[${PYTHON_USEDEP}]
28 test? ( dev-python/mock[${PYTHON_USEDEP}] )"
29
30 DOCS=( AUTHORS CHANGELOG sample.theme light.theme )
31
32 -# Req'd for clean build by each impl
33 -DISTUTILS_IN_SOURCE_BUILD=1
34 +distutils_enable_sphinx doc/sphinx/source --no-autodoc
35 +distutils_enable_tests unittest
36
37 -RESTRICT="test" #659110
38 -
39 -python_compile_all() {
40 - if use doc; then
41 - sphinx-build -b html -c doc/sphinx/source/ \
42 - doc/sphinx/source/ doc/sphinx/source/html || die "docs build failed"
43 - fi
44 -}
45 -
46 -python_test() {
47 - pushd build/lib > /dev/null
48 - "${PYTHON}" -m unittest discover || die
49 - popd > /dev/null
50 -}
51 -
52 -python_install_all() {
53 - use doc && local HTML_DOCS=( doc/sphinx/source/html/. )
54 - distutils-r1_python_install_all
55 +src_prepare() {
56 + sed -e 's:test_exec_dunder_file:_&:' \
57 + -e 's:test_exec_nonascii_file_linenums:_&:' \
58 + -i bpython/test/test_args.py || die
59 + distutils-r1_src_prepare
60 }