Version bump based on work by Arfrever in Progress overlay. Resolves bug 389631 by...
authorMike Gilbert <floppym@gentoo.org>
Thu, 15 Dec 2011 02:29:04 +0000 (02:29 +0000)
committerMike Gilbert <floppym@gentoo.org>
Thu, 15 Dec 2011 02:29:04 +0000 (02:29 +0000)
Package-Manager: portage-2.2.0_alpha81/cvs/Linux x86_64

dev-python/odfpy/ChangeLog
dev-python/odfpy/Manifest
dev-python/odfpy/files/odfpy-0.9.4-tests.patch [new file with mode: 0644]
dev-python/odfpy/odfpy-0.9.4.ebuild [new file with mode: 0644]

index ccbd27ced17cc058cba299d2dfb889a732f80753..fd077d14bcdbf7e5c9e70d4a710d024aa49856b0 100644 (file)
@@ -1,6 +1,13 @@
 # ChangeLog for dev-python/odfpy
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-python/odfpy/ChangeLog,v 1.5 2010/06/30 02:31:59 arfrever Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/odfpy/ChangeLog,v 1.6 2011/12/15 02:29:03 floppym Exp $
+
+*odfpy-0.9.4 (15 Dec 2011)
+
+  15 Dec 2011; Mike Gilbert <floppym@gentoo.org> +files/odfpy-0.9.4-tests.patch,
+  +odfpy-0.9.4.ebuild:
+  Version bump based on work by Arfrever in Progress overlay. Resolves bug
+  389631 by Ian Delaney.
 
   30 Jun 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
   odfpy-0.9.2.ebuild:
index 19731ee4dacf17bd230e570e231861caba7f833b..999dd5b5643ab0d2b4d246b5668325aac56fb034 100644 (file)
@@ -1,4 +1,17 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX odfpy-0.9.4-tests.patch 1084 RMD160 328fbd39f14ec2f5e5f992149f1ee1eecdf52bec SHA1 181eef95285f13a4052f814c950d1eb52d861788 SHA256 374b3fcde5c4887d794f05ebb7e28bdb1de6aad23c49fa60e64368154863bc2e
 DIST odfpy-0.9.2.tar.gz 398078 RMD160 6d6f3ad22251947aa5e79e2ce1443356dc1a10ee SHA1 67f0f034820936650c17dfc9db2bb31534a47f56 SHA256 8ed47b5e0d0c8fa31f5fcc53896d8201c28b3df018f26d3c1dbc361e44d93536
+DIST odfpy-0.9.4.tar.gz 463006 RMD160 d790923ba8ece8bd5a2963aa63ed6951c80f6430 SHA1 1c0b9a589d547ceffa7d524dbe7425cdd02a7f35 SHA256 e8a8b99c4cf16ef34b22f49dfab27ea9b8be6a18f423beec7fa29af13a7a73c8
 EBUILD odfpy-0.9.2.ebuild 976 RMD160 5e91ea7546433e464c207a0dc52bc33378d27547 SHA1 0ab60e812e7e37a0858cdcda9afd50349d65d4f0 SHA256 dd75e0c7d4aa961f592363229d25ff5516abfcdcfe95439e53d2f07e6a3c0756
-MISC ChangeLog 808 RMD160 25ba15de46f946ae1f0707a0e9ebbfbd82a474a7 SHA1 560ce0832bbac4d31c4091cae414f2e21bb2d3c2 SHA256 b1ec3bf1ee70b89ef75f83bdae8d38ca89b254fbe2dd76cc13e7e65421805a1e
+EBUILD odfpy-0.9.4.ebuild 1079 RMD160 abcdc3df15bb6410d86ed5916082d4366877a4aa SHA1 55e965f0d157a2a820adcde3c163c44f6fd92af4 SHA256 b966a975d7bb68f0ef9e033d2e333d58f8cbf3b6ff7d80abf6915d2c5d7868f9
+MISC ChangeLog 1040 RMD160 3e003468ffdfbbde6cf824147485bae6f6f58e8e SHA1 a958ea58ae1a1c62abe9d70b3b1aee22b379dbf2 SHA256 1cc22a4dd4592245b9d1772d9135a412fe024a484cc309a992963a77fae802ab
 MISC metadata.xml 160 RMD160 e730f96ab97c5be577a6d6d05f04990374a0dffb SHA1 2aa5e6be9c265c0e7bceb78ee9fd20df5f818e36 SHA256 6cd954a9de2307c57d32b25fa3599dee2908a4ddc6a98594f593d53577307a3a
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.17 (GNU/Linux)
+
+iF4EAREIAAYFAk7pW3wACgkQC77qH+pIQ6QeuQD+I4RwAdvBQ8qLeF8dndU8SHM6
+APOMA117GDDlJmltdQ0A/il/bxq5ORMOQ5wwTmoZMPB5yteIuPJOCB5XksutI2X3
+=mSSs
+-----END PGP SIGNATURE-----
diff --git a/dev-python/odfpy/files/odfpy-0.9.4-tests.patch b/dev-python/odfpy/files/odfpy-0.9.4-tests.patch
new file mode 100644 (file)
index 0000000..1c0be00
--- /dev/null
@@ -0,0 +1,32 @@
+--- tests/testxmlgen.py
++++ tests/testxmlgen.py
+@@ -20,6 +20,7 @@
+ import xml.sax, xml.sax.saxutils
+ import StringIO
++import sys
+ import unittest
+ class MyGen(xml.sax.saxutils.XMLGenerator):
+@@ -70,14 +71,16 @@
+ <a:greetings xmlns:a="http://example.com/ns">
+   <a:greet xml:lang="en">Hello world</a:greet>
+ </a:greetings>"""
+-        parser.feed(testcontent)
+-        parser.close()
+-        expectedresult="""<?xml version="1.0" encoding="utf-8"?>
++        if sys.version_info < (2, 7):
++            self.assertRaises(KeyError, parser.feed, testcontent)
++        else:
++            parser.feed(testcontent)
++            parser.close()
++            expectedresult="""<?xml version="1.0" encoding="utf-8"?>
+ <a:greetings xmlns:a="http://example.com/ns">
+   <a:greet xml:lang="en">Hello world</a:greet>
+ </a:greetings>"""
+-        self.assertEqual( outfp.getvalue(), expectedresult)
+-#       self.assertRaises(KeyError, parser.feed, testcontent)
++            self.assertEqual( outfp.getvalue(), expectedresult)
+     def test_myxml(self):
+         """ Test that my patch works """
diff --git a/dev-python/odfpy/odfpy-0.9.4.ebuild b/dev-python/odfpy/odfpy-0.9.4.ebuild
new file mode 100644 (file)
index 0000000..7958890
--- /dev/null
@@ -0,0 +1,44 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-python/odfpy/odfpy-0.9.4.ebuild,v 1.1 2011/12/15 02:29:01 floppym Exp $
+
+EAPI="4"
+PYTHON_DEPEND="2"
+SUPPORT_PYTHON_ABIS="1"
+RESTRICT_PYTHON_ABIS="3.*"
+
+inherit distutils eutils
+
+DESCRIPTION="Python API and tools to manipulate OpenDocument files"
+HOMEPAGE="https://joinup.ec.europa.eu/software/odfpy/home http://pypi.python.org/pypi/odfpy"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="Apache-2.0 GPL-2 LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+PYTHON_MODNAME="odf"
+
+src_prepare() {
+       distutils_src_prepare
+       epatch "${FILESDIR}/${P}-tests.patch"
+}
+
+src_test() {
+       testing() {
+               pushd tests > /dev/null || die
+               local exit_status=0 test
+               for test in test*.py; do
+                       einfo "Running ${test} ..."
+                       PYTHONPATH="../build-${PYTHON_ABI}/lib" "$(PYTHON)" "${test}"
+                       [[ $? -ne 0 ]] && exit_status=1
+               done
+               popd > /dev/null || die
+               return ${exit_status}
+       }
+       python_execute_function testing
+}