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/zc-buildout/
Date: Sun, 07 May 2017 18:43:46
Message-Id: 1494182604.743b5c504e058d36b47e1574b5fe6f82dcf4118c.mgorny@gentoo
1 commit: 743b5c504e058d36b47e1574b5fe6f82dcf4118c
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 4 18:50:16 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun May 7 18:43:24 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=743b5c50
7
8 dev-python/zc-buildout: Partially enable tests
9
10 Add missing test dependencies and python_test() implementation. Sadly,
11 the tests fail hard with Python 3.
12
13 dev-python/zc-buildout/zc-buildout-2.5.3.ebuild | 18 ++++++++++++++----
14 1 file changed, 14 insertions(+), 4 deletions(-)
15
16 diff --git a/dev-python/zc-buildout/zc-buildout-2.5.3.ebuild b/dev-python/zc-buildout/zc-buildout-2.5.3.ebuild
17 index a49133684c6..a5324fbf46e 100644
18 --- a/dev-python/zc-buildout/zc-buildout-2.5.3.ebuild
19 +++ b/dev-python/zc-buildout/zc-buildout-2.5.3.ebuild
20 @@ -1,4 +1,4 @@
21 -# Copyright 1999-2016 Gentoo Foundation
22 +# Copyright 1999-2017 Gentoo Foundation
23 # Distributed under the terms of the GNU General Public License v2
24
25 EAPI=5
26 @@ -16,18 +16,28 @@ SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
27 LICENSE="ZPL"
28 SLOT="0"
29 KEYWORDS="~amd64 ~x86"
30 -IUSE=""
31 +IUSE="test"
32
33 RDEPEND=">=dev-python/setuptools-3.3[${PYTHON_USEDEP}]"
34 -DEPEND="${RDEPEND}"
35 +DEPEND="${RDEPEND}
36 + test? ( dev-python/zope-testing[${PYTHON_USEDEP}] )"
37
38 S="${WORKDIR}"/${MY_P}
39
40 DOCS=( README.rst doc/tutorial.txt )
41 -# Tests require zope packages absent from portage
42
43 # Prevent incorrect installation of data file
44 python_prepare_all() {
45 sed -e '/^ include_package_data/d' -i setup.py || die
46 distutils-r1_python_prepare_all
47 }
48 +
49 +python_test() {
50 + if python_is_python3; then
51 + ewarn "Tests are broken for ${EPYTHON}, skipping"
52 + continue
53 + fi
54 +
55 + distutils_install_for_testing
56 + "${PYTHON}" src/zc/buildout/tests.py || die "Tests fail with ${EPYTHON}"
57 +}