From a68aa5dc03cc60e14219bd01c46eeab4725a8d49 Mon Sep 17 00:00:00 2001 From: Micha Glave Date: Fri, 16 Aug 2013 09:59:46 +0200 Subject: [PATCH] dev-python/genshi-0.7 with patch for http://genshi.edgewall.org/ticket/566 --- dev-python/genshi/Manifest | 3 ++ .../files/ticket566-genshi-0.6.x-r1238.diff | 41 ++++++++++++++++++ dev-python/genshi/genshi-0.7.ebuild | 43 +++++++++++++++++++ 3 files changed, 87 insertions(+) create mode 100644 dev-python/genshi/Manifest create mode 100644 dev-python/genshi/files/ticket566-genshi-0.6.x-r1238.diff create mode 100644 dev-python/genshi/genshi-0.7.ebuild diff --git a/dev-python/genshi/Manifest b/dev-python/genshi/Manifest new file mode 100644 index 0000000..9dace0e --- /dev/null +++ b/dev-python/genshi/Manifest @@ -0,0 +1,3 @@ +AUX ticket566-genshi-0.6.x-r1238.diff 1537 SHA256 c58e53c7b2d6183512d83a7f98bf413dc7ac627d4485ce33a5cec37db4eb5390 SHA512 ec22d941d03ecab9f6cc08baf15fa46e36c99e42600c51e9d6d530ad58a29a2105d2fe653185cf9b7d62759a17c61eeaef49d221149e0a39ad23a2b2818c035a WHIRLPOOL e063e94e681fb757f16e8d52982535e2af9d3d61c72a1e4c7c92a9eaec541eabce7eca7f9f17b5371057054f23fa748140443b83b51cef8d81864dceb2bab634 +DIST Genshi-0.7.tar.gz 491579 SHA256 1d154402e68bc444a55bcac101f96cb4e59373100cc7a2da07fbf3e5cc5d7352 SHA512 2d0042d4da4566725ddd80b73c5b7be09f479f5529e4aa69903edc2a98905ff6de42a0d5a6f02986d7962deb7740c4a3acf6955a8b77fdb42d3cf4ca037de6bf WHIRLPOOL 5e1a7af061d28a581c8a028ae7343a2b80697eb8bca01c8609345a3f2146db190a596d3488c0bde5aa132ac930d591ff1babd033ccb532c7cac7d2931751f906 +EBUILD genshi-0.7.ebuild 1031 SHA256 89592889daf1688f5c2f2ddefdc2987bab5492e59d61add55dbeec0f135f2d8e SHA512 d1e2e2f79d834f37247d3395921b5606e97b5a92e0f9f6a0802f1c865f0837bd086346a6ef0b496273b3725fbda718a7b344e529c0ae94b2f5cb4139b7d3b567 WHIRLPOOL d2ff39b9639f109b99ba3c48695ca399a72f296fb01813168ca6fdb2ee05b51f98ddcbf755ba2c8ab455b3da498e18ba42edb05f12d663b96fe324dd32000c97 diff --git a/dev-python/genshi/files/ticket566-genshi-0.6.x-r1238.diff b/dev-python/genshi/files/ticket566-genshi-0.6.x-r1238.diff new file mode 100644 index 0000000..6d1cad7 --- /dev/null +++ b/dev-python/genshi/files/ticket566-genshi-0.6.x-r1238.diff @@ -0,0 +1,41 @@ +Index: genshi/filters/i18n.py +=================================================================== +--- genshi/filters/i18n.py (revision 1238) ++++ genshi/filters/i18n.py (working copy) +@@ -1041,7 +1041,11 @@ + + while parts: + order, string = parts.pop(0) +- events = self.events[order].pop(0) ++ events = self.events[order] ++ if events: ++ events = events.pop(0) ++ else: ++ events = [(None, -1, -1)] + parts_counter[order].pop() + + for event in events: +Index: genshi/filters/tests/i18n.py +=================================================================== +--- genshi/filters/tests/i18n.py (revision 1238) ++++ genshi/filters/tests/i18n.py (working copy) +@@ -906,7 +906,19 @@ + """

""", + tmpl.generate(first="FIRST", second="SECOND").render()) + ++ def test_translate_i18n_msg_ticket_404_regression(self): ++ tmpl = MarkupTemplate(""" ++

text $name

++ """) ++ gettext = lambda s: u'head [1:%(name)s] tail' ++ translator = Translator(gettext) ++ translator.setup(tmpl) ++ self.assertEqual(""" ++

head NAME tail

++ """, tmpl.generate(name='NAME').render()) + ++ + class ChooseDirectiveTestCase(unittest.TestCase): + + def test_translate_i18n_choose_as_attribute(self): diff --git a/dev-python/genshi/genshi-0.7.ebuild b/dev-python/genshi/genshi-0.7.ebuild new file mode 100644 index 0000000..cc4c950 --- /dev/null +++ b/dev-python/genshi/genshi-0.7.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-python/genshi/genshi-0.7.ebuild,v 1.4 2013/06/25 13:01:14 ago Exp $ + +EAPI=5 +PYTHON_COMPAT=( python{2_5,2_6,2_7,3_1,3_2,3_3} pypy{1_9,2_0} ) + +inherit distutils-r1 + +MY_P="Genshi-${PV}" + +DESCRIPTION="Python toolkit for stream-based generation of output for the web." +HOMEPAGE="http://genshi.edgewall.org/ http://pypi.python.org/pypi/Genshi" +SRC_URI="http://ftp.edgewall.com/pub/genshi/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ppc ~ppc64 ~sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos" +IUSE="doc examples" + +DEPEND="dev-python/setuptools" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}/ticket566-genshi-0.6.x-r1238.diff" +} + +python_test() { + "${PYTHON}" setup.py test +} + +python_install_all() { + if use doc; then + dodoc doc/*.txt + dohtml -r doc/* + fi + if use examples; then + insinto /usr/share/doc/${PF} + doins -r examples + fi +}