Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 417077 | Differences between
and this patch

Collapse All | Expand All

(-)../logilab-common.orig/logilab-common-0.58.0.ebuild (-6 / +29 lines)
Lines 2-10 Link Here
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/logilab-common/logilab-common-0.57.2.ebuild,v 1.1 2012/04/11 07:32:29 patrick Exp $
3
# $Header: /var/cvsroot/gentoo-x86/dev-python/logilab-common/logilab-common-0.57.2.ebuild,v 1.1 2012/04/11 07:32:29 patrick Exp $
4
4
5
EAPI="3"
5
EAPI="4"
6
SUPPORT_PYTHON_ABIS="1"
6
SUPPORT_PYTHON_ABIS="1"
7
7
PYTHON_TESTS_RESTRICTED_ABIS="3.*"
8
inherit distutils
8
inherit distutils
9
9
10
DESCRIPTION="Useful miscellaneous modules used by Logilab projects"
10
DESCRIPTION="Useful miscellaneous modules used by Logilab projects"
Lines 14-33 Link Here
14
LICENSE="LGPL-2.1"
14
LICENSE="LGPL-2.1"
15
SLOT="0"
15
SLOT="0"
16
KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
16
KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
17
IUSE="test"
17
IUSE="test doc"
18
18
19
# dev-python/unittest2 is not required with Python >=3.2.
19
# dev-python/unittest2 is not required with Python >=3.2.
20
RDEPEND="dev-python/setuptools
20
RDEPEND="dev-python/setuptools
21
	dev-python/unittest2"
21
	dev-python/unittest2"
22
22
# Tests using dev-python/psycopg are skipped when dev-python/psycopg isn't installed.
23
# Tests using dev-python/psycopg are skipped when dev-python/psycopg isn't installed.
23
DEPEND="${RDEPEND}
24
DEPEND="${RDEPEND}
24
	test? (
25
	test? (
25
		dev-python/egenix-mx-base
26
		dev-python/egenix-mx-base
26
		!dev-python/psycopg[-mxdatetime]
27
		!dev-python/psycopg[-mxdatetime]
27
	)"
28
	)
29
	doc? ( dev-python/epydoc )"
28
30
29
PYTHON_MODNAME="logilab"
31
PYTHON_MODNAME="logilab"
30
32
33
src_prepare() {
34
	if use doc; then
35
		sed -e 's:(CURDIR):{S}/${P}:' -i doc/makefile || die
36
	fi
37
	distutils_src_prepare
38
}
39
40
src_compile() {
41
	distutils_src_compile
42
43
	# Simplest way to make makefile point to the right place.
44
	mklinks() {
45
		# dosym it seems is restricted to src_install.
46
		ln -s build-${PYTHON_ABI} build
47
		emake -C doc epydoc
48
		rm build
49
	}
50
	use doc && python_execute_function -f mklinks
51
}
52
31
src_test() {
53
src_test() {
32
	testing() {
54
	testing() {
33
		# Install temporarily.
55
		# Install temporarily.
Lines 40-48 Link Here
40
		pushd "${spath}" > /dev/null || return 1
62
		pushd "${spath}" > /dev/null || return 1
41
		if [[ "${PYTHON_ABI}" == 3.* ]]; then
63
		if [[ "${PYTHON_ABI}" == 3.* ]]; then
42
			# Support for Python 3 is experimental. Some tests are known to fail.
64
			# Support for Python 3 is experimental. Some tests are known to fail.
43
			PYTHONPATH="${spath}" "$(PYTHON)" "${tpath}${EPREFIX}/usr/bin/pytest" -v
65
			PYTHONPATH=.:/logilab/common/test "${tpath}${EPREFIX}/usr/bin/pytest" -v || return 1
44
		else
66
		else
45
			PYTHONPATH="${spath}" "$(PYTHON)" "${tpath}${EPREFIX}/usr/bin/pytest" -v || return 1
67
			"${tpath}${EPREFIX}/usr/bin/pytest" -v || return 1
46
		fi
68
		fi
47
		popd > /dev/null || return 1
69
		popd > /dev/null || return 1
48
	}
70
	}
Lines 60-63 Link Here
60
		rm -fr "${ED}$(python_get_sitedir)/${PN/-//}/test"
82
		rm -fr "${ED}$(python_get_sitedir)/${PN/-//}/test"
61
	}
83
	}
62
	python_execute_function -q delete_tests
84
	python_execute_function -q delete_tests
85
	use doc && dohtml -r doc/apidoc/
63
}
86
}

Return to bug 417077