Gentoo Archives: gentoo-commits

From: Virgil Dupras <vdupras@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/xlutils/files/, dev-python/xlutils/
Date: Wed, 08 May 2019 14:41:49
Message-Id: 1557326477.25b1b4f492f813c6c92a8c10bdbe73662f3edb1b.vdupras@gentoo
1 commit: 25b1b4f492f813c6c92a8c10bdbe73662f3edb1b
2 Author: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 8 14:40:02 2019 +0000
4 Commit: Virgil Dupras <vdupras <AT> gentoo <DOT> org>
5 CommitDate: Wed May 8 14:41:17 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25b1b4f4
7
8 dev-python/xlutils: add py3 compat
9
10 Also, fix tests.
11
12 Closes: https://bugs.gentoo.org/655826
13 Closes: https://bugs.gentoo.org/663412
14 Signed-off-by: Virgil Dupras <vdupras <AT> gentoo.org>
15 Package-Manager: Portage-2.3.62, Repoman-2.3.11
16
17 .../xlutils/files/xlutils-2.0.0-fix-tests.patch | 23 ++++++++++++++++++++++
18 ...lutils-2.0.0.ebuild => xlutils-2.0.0-r1.ebuild} | 23 ++++++++++++++--------
19 2 files changed, 38 insertions(+), 8 deletions(-)
20
21 diff --git a/dev-python/xlutils/files/xlutils-2.0.0-fix-tests.patch b/dev-python/xlutils/files/xlutils-2.0.0-fix-tests.patch
22 new file mode 100644
23 index 00000000000..b7e74925095
24 --- /dev/null
25 +++ b/dev-python/xlutils/files/xlutils-2.0.0-fix-tests.patch
26 @@ -0,0 +1,23 @@
27 +From e9edf279ba2e699be92da7611368cf92b4d87cec Mon Sep 17 00:00:00 2001
28 +From: Chris Withers <chris@×××××××××××××.uk>
29 +Date: Wed, 4 Apr 2018 08:05:06 +0100
30 +Subject: [PATCH] fix test expectations
31 +
32 +---
33 + xlutils/tests/test_view.py | 4 +++-
34 + 1 file changed, 3 insertions(+), 1 deletion(-)
35 +
36 +diff --git a/xlutils/tests/test_view.py b/xlutils/tests/test_view.py
37 +index 7b32892..5b4aa2b 100644
38 +--- a/xlutils/tests/test_view.py
39 ++++ b/xlutils/tests/test_view.py
40 +@@ -219,6 +219,8 @@ def test_does_not_match(self):
41 + ('XX',)
42 +
43 + actual:
44 +-(u'',)'''
45 ++(u'',)
46 ++
47 ++While comparing [5][1]: 'XX' (expected) != u'' (actual)'''
48 +
49 + compare(expected, actual=str(s.raised))
50
51 diff --git a/dev-python/xlutils/xlutils-2.0.0.ebuild b/dev-python/xlutils/xlutils-2.0.0-r1.ebuild
52 similarity index 51%
53 rename from dev-python/xlutils/xlutils-2.0.0.ebuild
54 rename to dev-python/xlutils/xlutils-2.0.0-r1.ebuild
55 index d701317d102..1da8b0f0d4b 100644
56 --- a/dev-python/xlutils/xlutils-2.0.0.ebuild
57 +++ b/dev-python/xlutils/xlutils-2.0.0-r1.ebuild
58 @@ -1,9 +1,9 @@
59 -# Copyright 1999-2018 Gentoo Foundation
60 +# Copyright 1999-2019 Gentoo Authors
61 # Distributed under the terms of the GNU General Public License v2
62
63 -EAPI=6
64 +EAPI=7
65
66 -PYTHON_COMPAT=( python2_7 )
67 +PYTHON_COMPAT=( python2_7 python3_{5,6} )
68
69 inherit distutils-r1
70
71 @@ -18,18 +18,25 @@ LICENSE="MIT"
72 SLOT="0"
73
74 RDEPEND="
75 - dev-python/xlwt[${PYTHON_USEDEP}]
76 - dev-python/xlrd[${PYTHON_USEDEP}]"
77 + >=dev-python/xlwt-1.3[${PYTHON_USEDEP}]
78 + >=dev-python/xlrd-1.2[${PYTHON_USEDEP}]"
79
80 DEPEND="${RDEPEND}
81 test? (
82 - dev-python/errorhandler[${PYTHON_USEDEP}]
83 - dev-python/manuel[${PYTHON_USEDEP}]
84 + >=dev-python/errorhandler-2[${PYTHON_USEDEP}]
85 + >=dev-python/manuel-1.9[${PYTHON_USEDEP}]
86 dev-python/mock[${PYTHON_USEDEP}]
87 + dev-python/nose[${PYTHON_USEDEP}]
88 dev-python/pytest[${PYTHON_USEDEP}]
89 dev-python/testfixtures[${PYTHON_USEDEP}]
90 )"
91
92 +PATCHES=(
93 + "${FILESDIR}/${PN}-2.0.0-fix-tests.patch"
94 +)
95 +
96 python_test() {
97 - py.test -v xlutils/tests || die "Tests fail with ${EPYTHON}"
98 + # upstream runs its tests with nose, but the suite actually runs better
99 + # when ran through pytest...
100 + pytest -vv || die "Tests fail with ${EPYTHON}"
101 }