diff options
author | 2012-10-29 16:26:39 +0000 | |
---|---|---|
committer | 2012-10-29 16:26:39 +0000 | |
commit | 0ae790c29081be16e3d2385c9bf3a2bc2e96636b (patch) | |
tree | 5bacd44576426cb3590cb2a7b6292d572c845b89 /dev-python/lxml | |
parent | Use virtual for argparse. (diff) | |
download | gentoo-2-0ae790c29081be16e3d2385c9bf3a2bc2e96636b.tar.gz gentoo-2-0ae790c29081be16e3d2385c9bf3a2bc2e96636b.tar.bz2 gentoo-2-0ae790c29081be16e3d2385c9bf3a2bc2e96636b.zip |
Fix running tests with out-of-source builds. Minor fixes & restore keywords lost due to python-exec.
(Portage version: 2.2.0_alpha142/cvs/Linux x86_64, signed Manifest commit with key 42B9401D)
Diffstat (limited to 'dev-python/lxml')
-rw-r--r-- | dev-python/lxml/ChangeLog | 6 | ||||
-rw-r--r-- | dev-python/lxml/lxml-3.0.1.ebuild | 46 |
2 files changed, 27 insertions, 25 deletions
diff --git a/dev-python/lxml/ChangeLog b/dev-python/lxml/ChangeLog index 9bdc3d017f60..73d2b6701d43 100644 --- a/dev-python/lxml/ChangeLog +++ b/dev-python/lxml/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-python/lxml # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/lxml/ChangeLog,v 1.139 2012/10/20 16:22:03 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/lxml/ChangeLog,v 1.140 2012/10/29 16:26:39 mgorny Exp $ + + 29 Oct 2012; Michał Górny <mgorny@gentoo.org> lxml-3.0.1.ebuild: + Fix running tests with out-of-source builds. Minor fixes & restore keywords + lost due to python-exec. 20 Oct 2012; Jeroen Roovers <jer@gentoo.org> lxml-3.0.1.ebuild: Marked ~hppa (bug #438388). diff --git a/dev-python/lxml/lxml-3.0.1.ebuild b/dev-python/lxml/lxml-3.0.1.ebuild index 51a5a5eb5af6..05ddf192a7e0 100644 --- a/dev-python/lxml/lxml-3.0.1.ebuild +++ b/dev-python/lxml/lxml-3.0.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/lxml/lxml-3.0.1.ebuild,v 1.2 2012/10/20 16:22:03 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/lxml/lxml-3.0.1.ebuild,v 1.3 2012/10/29 16:26:39 mgorny Exp $ EAPI=4 PYTHON_COMPAT=(python2_6 python2_7 python3_1 python3_2 python3_3) @@ -16,7 +16,7 @@ SRC_URI="http://codespeak.net/lxml/${MY_P}.tgz" LICENSE="BSD ElementTree GPL-2 PSF-2" SLOT="0" -KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" # have to drop some keywords pending resolution of bug #438388 #KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" @@ -33,31 +33,29 @@ DEPEND="${RDEPEND} S="${WORKDIR}/${MY_P}" src_prepare() { - epatch "${FILESDIR}/${P}-skip-failing-test.patch" + PATCHES=( "${FILESDIR}/${P}-skip-failing-test.patch" ) distutils-r1_src_prepare } -src_test() { - run_tests() { - # Tests broken with Python 3, generally due to Unicode. - [[ "${EPYTHON%.*}" == python3 ]] && return - - local module - for module in $(ls build/lib.*/lxml/*.so); do - ln -s "../../${module}" "src/lxml/$(basename ${module})" - done - - local exit_status="0" test - for test in test.py selftest.py selftest2.py; do - einfo "Running ${test}" - if ! "${PYTHON}" ${test}; then - eerror "${test} failed with ${EPYTHON}" - exit_status="1" - fi - done - return "${exit_status}" - } - python_foreach_impl run_tests +python_test() { + # Tests broken with Python 3, generally due to Unicode. + [[ ${EPYTHON} == python3.* ]] && return + + local module + for module in "${BUILD_DIR}"/lib.*/lxml/*.so; do + ln -fs "${module}" src/lxml/ || die + done + + local exit_status="0" test + local PYTHONPATH=src/ # needed for selftest* + for test in test.py selftest.py selftest2.py; do + einfo "Running ${test}" + if ! "${PYTHON}" ${test}; then + eerror "${test} failed with ${EPYTHON}" + exit_status="1" + fi + done + return "${exit_status}" } src_install() { |