Gentoo Archives: gentoo-commits

From: "Mike Gilbert (floppym)" <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-python/astng: astng-0.23.1.ebuild
Date: Fri, 20 Apr 2012 00:53:50
Message-Id: 20120420005340.B36E92004B@flycatcher.gentoo.org
1 floppym 12/04/20 00:53:40
2
3 Modified: astng-0.23.1.ebuild
4 Log:
5 Revert accidental commit.
6
7 (Portage version: 2.2.0_alpha100/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.3 dev-python/astng/astng-0.23.1.ebuild
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/astng/astng-0.23.1.ebuild?rev=1.3&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/astng/astng-0.23.1.ebuild?rev=1.3&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-python/astng/astng-0.23.1.ebuild?r1=1.2&r2=1.3
15
16 Index: astng-0.23.1.ebuild
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-python/astng/astng-0.23.1.ebuild,v
19 retrieving revision 1.2
20 retrieving revision 1.3
21 diff -u -r1.2 -r1.3
22 --- astng-0.23.1.ebuild 20 Apr 2012 00:45:12 -0000 1.2
23 +++ astng-0.23.1.ebuild 20 Apr 2012 00:53:40 -0000 1.3
24 @@ -1,10 +1,12 @@
25 -# Copyright 1999-2011 Gentoo Foundation
26 +# Copyright 1999-2012 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-python/astng/astng-0.23.1.ebuild,v 1.2 2012/04/20 00:45:12 floppym Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-python/astng/astng-0.23.1.ebuild,v 1.3 2012/04/20 00:53:40 floppym Exp $
30
31 EAPI="4"
32 +PYTHON_DEPEND="2"
33 SUPPORT_PYTHON_ABIS="1"
34 PYTHON_TESTS_FAILURES_TOLERANT_ABIS="3.* *-jython"
35 +RESTRICT_PYTHON_ABIS="3.* *-pypy-* *-jython"
36
37 inherit distutils
38
39 @@ -21,12 +23,25 @@
40 RDEPEND=">=dev-python/logilab-common-0.53.0"
41 DEPEND="${RDEPEND}
42 dev-python/setuptools
43 - test? ( >=dev-python/egenix-mx-base-3.0.0 )"
44 + test? ( >=dev-python/egenix-mx-base-3.0.0 )
45 + ( dev-python/unittest2 )"
46
47 S="${WORKDIR}/logilab-${P}"
48
49 +DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1"
50 +
51 PYTHON_MODNAME="logilab/astng"
52
53 +src_prepare() {
54 + distutils_src_prepare
55 +
56 + conversion() {
57 + [[ "${PYTHON_ABI}" == 2.* ]] && return
58 + find -name "*.py" ! -name "setup.py" -print | xargs 2to3-${PYTHON_ABI} -nw --no-diffs
59 + }
60 + python_execute_function -s conversion
61 +}
62 +
63 src_test() {
64 testing() {
65 local tpath="${T}/test-${PYTHON_ABI}"
66 @@ -35,14 +50,19 @@
67 mkdir -p "${spath}/logilab" || return 1
68 cp -r "$(python_get_sitedir)/logilab/common" "${spath}/logilab" || return 1
69
70 - "$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" install --root="${tpath}" || die "Installation for tests failed with $(python_get_implementation_and_version)"
71 + "$(PYTHON)" setup.py install --root="${tpath}" || die "Installation for tests failed with $(python_get_implementation) $(python_get_version)"
72
73 # pytest uses tests placed relatively to the current directory.
74 pushd "${spath}/logilab/astng" > /dev/null || return 1
75 - PYTHONPATH="${spath}" pytest -v || return 1
76 + if [[ "${PYTHON_ABI}" == 3.* ]]; then
77 + # Support for Python 3 is experimental. Some tests are known to fail.
78 + PYTHONPATH="${spath}" pytest -v
79 + else
80 + PYTHONPATH="${spath}" pytest -v || return 1
81 + fi
82 popd > /dev/null || return 1
83 }
84 - python_execute_function testing
85 + python_execute_function -s testing
86 }
87
88 src_install() {