Lines 1-11
Link Here
|
1 |
# Copyright 1999-2011 Gentoo Foundation |
1 |
# Copyright 1999-2011 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/dev-python/astng/astng-0.23.1.ebuild,v 1.2 2011/08/06 16:29:23 hwoarang Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/dev-python/astng/astng-0.23.1.ebuild,v 1.4 2012/02/03 20:53:05 maekke Exp $ |
4 |
|
4 |
|
5 |
EAPI="3" |
5 |
EAPI="4" |
|
|
6 |
PYTHON_DEPEND="2" |
6 |
SUPPORT_PYTHON_ABIS="1" |
7 |
SUPPORT_PYTHON_ABIS="1" |
7 |
PYTHON_TESTS_FAILURES_TOLERANT_ABIS="3.* *-jython" |
8 |
PYTHON_TESTS_FAILURES_TOLERANT_ABIS="3.* *-jython" |
8 |
|
9 |
RESTRICT_PYTHON_ABIS="3.* *-pypy-* *-jython" |
9 |
inherit distutils |
10 |
inherit distutils |
10 |
|
11 |
|
11 |
DESCRIPTION="Abstract Syntax Tree New Generation for logilab packages" |
12 |
DESCRIPTION="Abstract Syntax Tree New Generation for logilab packages" |
Lines 21-32
Link Here
|
21 |
RDEPEND=">=dev-python/logilab-common-0.53.0" |
22 |
RDEPEND=">=dev-python/logilab-common-0.53.0" |
22 |
DEPEND="${RDEPEND} |
23 |
DEPEND="${RDEPEND} |
23 |
dev-python/setuptools |
24 |
dev-python/setuptools |
24 |
test? ( >=dev-python/egenix-mx-base-3.0.0 )" |
25 |
test? ( >=dev-python/egenix-mx-base-3.0.0 ) |
|
|
26 |
( dev-python/unittest2 )" |
25 |
|
27 |
|
26 |
S="${WORKDIR}/logilab-${P}" |
28 |
S="${WORKDIR}/logilab-${P}" |
27 |
|
29 |
|
|
|
30 |
DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES="1" |
31 |
|
28 |
PYTHON_MODNAME="logilab/astng" |
32 |
PYTHON_MODNAME="logilab/astng" |
29 |
|
33 |
|
|
|
34 |
src_prepare() { |
35 |
distutils_src_prepare |
36 |
|
37 |
conversion() { |
38 |
[[ "${PYTHON_ABI}" == 2.* ]] && return |
39 |
find -name "*.py" ! -name "setup.py" -print | xargs 2to3-${PYTHON_ABI} -nw --no-diffs |
40 |
} |
41 |
python_execute_function -s conversion |
42 |
} |
43 |
|
30 |
src_test() { |
44 |
src_test() { |
31 |
testing() { |
45 |
testing() { |
32 |
local tpath="${T}/test-${PYTHON_ABI}" |
46 |
local tpath="${T}/test-${PYTHON_ABI}" |
Lines 35-48
Link Here
|
35 |
mkdir -p "${spath}/logilab" || return 1 |
49 |
mkdir -p "${spath}/logilab" || return 1 |
36 |
cp -r "$(python_get_sitedir)/logilab/common" "${spath}/logilab" || return 1 |
50 |
cp -r "$(python_get_sitedir)/logilab/common" "${spath}/logilab" || return 1 |
37 |
|
51 |
|
38 |
"$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" install --root="${tpath}" || die "Installation for tests failed with $(python_get_implementation_and_version)" |
52 |
"$(PYTHON)" setup.py install --root="${tpath}" || die "Installation for tests failed with $(python_get_implementation) $(python_get_version)" |
39 |
|
53 |
|
40 |
# pytest uses tests placed relatively to the current directory. |
54 |
# pytest uses tests placed relatively to the current directory. |
41 |
pushd "${spath}/logilab/astng" > /dev/null || return 1 |
55 |
pushd "${spath}/logilab/astng" > /dev/null || return 1 |
42 |
PYTHONPATH="${spath}" pytest -v || return 1 |
56 |
if [[ "${PYTHON_ABI}" == 3.* ]]; then |
|
|
57 |
# Support for Python 3 is experimental. Some tests are known to fail. |
58 |
PYTHONPATH="${spath}" pytest -v |
59 |
else |
60 |
PYTHONPATH="${spath}" pytest -v || return 1 |
61 |
fi |
43 |
popd > /dev/null || return 1 |
62 |
popd > /dev/null || return 1 |
44 |
} |
63 |
} |
45 |
python_execute_function testing |
64 |
python_execute_function -s testing |
46 |
} |
65 |
} |
47 |
|
66 |
|
48 |
src_install() { |
67 |
src_install() { |