diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2010-03-27 18:55:08 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2010-03-27 18:55:08 +0000 |
commit | 867fbb5ddd84617616a5c848cd6045a879769efb (patch) | |
tree | 45fe3fd8836f37c2017b4acdc376fb7f1ce0f51f /dev-python/python-bibtex | |
parent | Delete older ebuild. (diff) | |
download | gentoo-2-867fbb5ddd84617616a5c848cd6045a879769efb.tar.gz gentoo-2-867fbb5ddd84617616a5c848cd6045a879769efb.tar.bz2 gentoo-2-867fbb5ddd84617616a5c848cd6045a879769efb.zip |
Set SUPPORT_PYTHON_ABIS. Fix tests (bug #264439).
(Portage version: 15841-svn/cvs/Linux x86_64)
Diffstat (limited to 'dev-python/python-bibtex')
-rw-r--r-- | dev-python/python-bibtex/ChangeLog | 8 | ||||
-rw-r--r-- | dev-python/python-bibtex/files/python-bibtex-1.2.4-fix_tests.patch | 28 | ||||
-rw-r--r-- | dev-python/python-bibtex/python-bibtex-1.2.4.ebuild | 25 |
3 files changed, 55 insertions, 6 deletions
diff --git a/dev-python/python-bibtex/ChangeLog b/dev-python/python-bibtex/ChangeLog index 5d2a44191f1c..233b3ef5e635 100644 --- a/dev-python/python-bibtex/ChangeLog +++ b/dev-python/python-bibtex/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-python/python-bibtex -# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/python-bibtex/ChangeLog,v 1.20 2008/08/12 11:45:33 armin76 Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/python-bibtex/ChangeLog,v 1.21 2010/03/27 18:55:08 arfrever Exp $ + + 27 Mar 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> + python-bibtex-1.2.4.ebuild, +files/python-bibtex-1.2.4-fix_tests.patch: + Set SUPPORT_PYTHON_ABIS. Fix tests (bug #264439). 12 Aug 2008; Raúl Porcel <armin76@gentoo.org> python-bibtex-1.2.4.ebuild: ia64/x86 stable wrt #233593 diff --git a/dev-python/python-bibtex/files/python-bibtex-1.2.4-fix_tests.patch b/dev-python/python-bibtex/files/python-bibtex-1.2.4-fix_tests.patch new file mode 100644 index 000000000000..f9816817b777 --- /dev/null +++ b/dev-python/python-bibtex/files/python-bibtex-1.2.4-fix_tests.patch @@ -0,0 +1,28 @@ +--- testsuite.py ++++ testsuite.py +@@ -4,6 +4,7 @@ + + import sys, os + ++ParserError = "ParserError" + + def check_recode (): + try: +@@ -65,7 +66,7 @@ + + valid = result.readline ().strip () + +- if obtained != valid: ++ if eval(obtained) != eval(valid): + sys.stderr.write ('error: %s: line %d: unexpected result:\n' % ( + filename, line)) + sys.stderr.write ('error: %s: line %d: obtained %s\n' % ( +@@ -117,7 +118,7 @@ + + valid = result.readline ().strip () + +- if obtained != valid: ++ if eval(obtained) != eval(valid): + sys.stderr.write ('error: %s: line %d: unexpected result:\n' % ( + filename, line)) + sys.stderr.write ('error: %s: line %d: obtained %s\n' % ( diff --git a/dev-python/python-bibtex/python-bibtex-1.2.4.ebuild b/dev-python/python-bibtex/python-bibtex-1.2.4.ebuild index 50eb294774fe..40c2cb00d3a4 100644 --- a/dev-python/python-bibtex/python-bibtex-1.2.4.ebuild +++ b/dev-python/python-bibtex/python-bibtex-1.2.4.ebuild @@ -1,8 +1,12 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-python/python-bibtex/python-bibtex-1.2.4.ebuild,v 1.6 2008/08/12 11:45:33 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-python/python-bibtex/python-bibtex-1.2.4.ebuild,v 1.7 2010/03/27 18:55:08 arfrever Exp $ -inherit distutils +EAPI="3" +PYTHON_DEPEND="2" +SUPPORT_PYTHON_ABIS="1" + +inherit distutils eutils DESCRIPTION="A Python extension to parse BibTeX files" HOMEPAGE="http://pybliographer.org/" @@ -17,7 +21,20 @@ RDEPEND=">=dev-libs/glib-2 >=app-text/recode-3.6-r1" DEPEND="${RDEPEND} dev-util/pkgconfig" +RESTRICT_PYTHON_ABIS="3.*" + +src_prepare() { + distutils_src_prepare + + epatch "${FILESDIR}/${P}-fix_tests.patch" + + # Disable tests during installation. + sed -e "/self.run_command ('check')/d" -i setup.py +} src_test() { - "${python}" setup.py check || die "tests failed" + testing() { + "$(PYTHON)" setup.py build -b "build-${PYTHON_ABI}" check + } + python_execute_function testing } |