Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/traits/
Date: Wed, 04 May 2016 09:05:08
Message-Id: 1462351816.1abcecf6b7283dcc17b63cf55f33ad83d084a2a7.monsieurp@gentoo
1 commit: 1abcecf6b7283dcc17b63cf55f33ad83d084a2a7
2 Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 4 08:49:18 2016 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Wed May 4 08:50:16 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1abcecf6
7
8 dev-python/traits: Add Python 3.3 to PYTHON_COMPAT. Convert tests to Python 3.
9
10 Gentoo-Bug: https://bugs.gentoo.org/581316
11
12 Package-Manager: portage-2.2.26
13
14 dev-python/traits/traits-4.5.0-r1.ebuild | 46 ++++++++++++++++++++++++++++++++
15 1 file changed, 46 insertions(+)
16
17 diff --git a/dev-python/traits/traits-4.5.0-r1.ebuild b/dev-python/traits/traits-4.5.0-r1.ebuild
18 new file mode 100644
19 index 0000000..fc8928c
20 --- /dev/null
21 +++ b/dev-python/traits/traits-4.5.0-r1.ebuild
22 @@ -0,0 +1,46 @@
23 +# Copyright 1999-2016 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +# $Id$
26 +
27 +EAPI=5
28 +
29 +PYTHON_COMPAT=(python{2_7,3_3})
30 +
31 +inherit distutils-r1 virtualx
32 +
33 +DESCRIPTION="Enthought Tool Suite: Explicitly typed attributes for Python"
34 +HOMEPAGE="http://code.enthought.com/projects/traits/"
35 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
36 +
37 +LICENSE="BSD"
38 +SLOT="0"
39 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux"
40 +IUSE="test"
41 +
42 +RDEPEND="dev-python/numpy[${PYTHON_USEDEP}]"
43 +
44 +DEPEND="
45 + dev-python/setuptools[${PYTHON_USEDEP}]
46 + test? ( ${RDEPEND} )"
47 +
48 +python_prepare() {
49 + if python_is_python3; then
50 + einfo "Converting tests to Python 3 syntax"
51 + 2to3 -w -n --no-diffs traits/testing || die
52 + fi
53 +}
54 +
55 +python_prepare_all() {
56 + sed -i -e "s/'-O3'//g" setup.py || die
57 + distutils-r1_python_prepare_all
58 +}
59 +
60 +python_compile() {
61 + local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
62 + distutils-r1_python_compile
63 +}
64 +
65 +python_test() {
66 + cd "${BUILD_DIR}"/lib || die
67 + nosetests || die
68 +}