commit:     62907307016fa059bc999da22a7f4797c84f08e7
Author:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Fri Mar  8 23:19:35 2024 +0000
Commit:     Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Fri Mar  8 23:19:55 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62907307

net-mail/rss2email: Fix tests for >=dev-python/html2text-2024.2.25

Closes: https://bugs.gentoo.org/926133
Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org>

 .../rss2email/files/rss2email-3.14-tests.patch     | 24 ++++++++++++++
 net-mail/rss2email/rss2email-3.14-r2.ebuild        | 38 ++++++++++++++++++++++
 2 files changed, 62 insertions(+)

diff --git a/net-mail/rss2email/files/rss2email-3.14-tests.patch 
b/net-mail/rss2email/files/rss2email-3.14-tests.patch
new file mode 100644
index 000000000000..b797f9d00d94
--- /dev/null
+++ b/net-mail/rss2email/files/rss2email-3.14-tests.patch
@@ -0,0 +1,24 @@
+From b5c0e78006c2db6929b5ff50e8529de58a00412a Mon Sep 17 00:00:00 2001
+From: auouymous <a...@qzx.com>
+Date: Fri, 8 Mar 2024 15:50:04 -0700
+Subject: [PATCH] Replace a "c2 a0" utf-8 sequence in test feed with a space.
+
+This caused html2text >=2024.2.25 to produce a double space and break
+the tests.
+---
+ test/data/allthingsrss/feed.atom | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test/data/allthingsrss/feed.atom 
b/test/data/allthingsrss/feed.atom
+index 074847b..0cf8c33 100644
+--- a/test/data/allthingsrss/feed.atom
++++ b/test/data/allthingsrss/feed.atom
+@@ -47,7 +47,7 @@
+ &lt;/ul&gt;
+ &lt;p&gt;Complete list in the official &lt;a 
href="http://www.allthingsrss.com/rss2email/changelog"&gt;CHANGELOG&lt;/a&gt;.&lt;/p&gt;
+ &lt;p&gt;&lt;strong&gt;Pause/Unpause&lt;/strong&gt;&lt;/p&gt;
+-&lt;p&gt;Through &lt;code&gt;r2e pause &lt;em&gt;n&lt;/em&gt;&lt;/code&gt; 
where &lt;em&gt;n&lt;/em&gt; is a feed number, you can temporarily suspend 
checking that feed for new content. To start checking it again, simply run 
&lt;code&gt;r2e unpause &lt;em&gt;n&lt;/em&gt;&lt;/code&gt;. When you 
&lt;code&gt;r2e list&lt;/code&gt;, an asterisk indicates that the feed is 
currently unpaused and active.&lt;/p&gt;
++&lt;p&gt;Through &lt;code&gt;r2e pause &lt;em&gt;n&lt;/em&gt;&lt;/code&gt; 
where &lt;em&gt;n&lt;/em&gt; is a feed number, you can temporarily suspend 
checking that feed for new content. To start checking it again, simply run 
&lt;code&gt;r2e unpause &lt;em&gt;n&lt;/em&gt;&lt;/code&gt;. When you 
&lt;code&gt;r2e list&lt;/code&gt;, an asterisk indicates that the feed is 
currently unpaused and active.&lt;/p&gt;
+ 
+ &lt;p&gt;&lt;a 
href="http://feedads.g.doubleclick.net/~a/nYgTsIUsS9pmvRZ6092XGGHnNKg/0/da"&gt;&lt;img
 src="http://feedads.g.doubleclick.net/~a/nYgTsIUsS9pmvRZ6092XGGHnNKg/0/di"; 
border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
+ &lt;a 
href="http://feedads.g.doubleclick.net/~a/nYgTsIUsS9pmvRZ6092XGGHnNKg/1/da"&gt;&lt;img
 src="http://feedads.g.doubleclick.net/~a/nYgTsIUsS9pmvRZ6092XGGHnNKg/1/di"; 
border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img 
src="http://feeds.feedburner.com/~r/allthingsrss/hJBr/~4/bT-I0iH2vw8"; 
height="1" width="1"/&gt;</content>

diff --git a/net-mail/rss2email/rss2email-3.14-r2.ebuild 
b/net-mail/rss2email/rss2email-3.14-r2.ebuild
new file mode 100644
index 000000000000..1f055a148d50
--- /dev/null
+++ b/net-mail/rss2email/rss2email-3.14-r2.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=poetry
+PYTHON_COMPAT=( python3_{9..12} )
+
+inherit distutils-r1
+
+DESCRIPTION="A python script that converts RSS/Atom newsfeeds to email"
+HOMEPAGE="https://github.com/rss2email/rss2email";
+SRC_URI="https://github.com/rss2email/rss2email/archive/v${PV}.tar.gz -> 
${P}.tar.gz"
+
+LICENSE="|| ( GPL-2 GPL-3 )"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc64 ~x86"
+
+RDEPEND=">=dev-python/feedparser-6.0.5[${PYTHON_USEDEP}]
+       >=dev-python/html2text-2020.1.16[${PYTHON_USEDEP}]
+       "
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-tests.patch
+)
+
+distutils_enable_tests unittest
+
+src_install() {
+       distutils-r1_src_install
+       doman r2e.1
+}
+
+python_test() {
+       cd test/ || die  # or the tests won't find their data
+       distutils-r1_python_test
+}

Reply via email to