3 files changed, 10 insertions(+), 62 deletions(-)
D sr.ht/py3-emailthreads/0001-Don-t-strip-whitespace-from-lines.patch
D sr.ht/py3-emailthreads/0002-Ignore-UTF-8-errors-when-decoding-emails.patch
M sr.ht/py3-emailthreads/APKBUILD
D sr.ht/py3-emailthreads/0001-Don-t-strip-whitespace-from-lines.patch => sr.ht/py3-emailthreads/0001-Don-t-strip-whitespace-from-lines.patch +0 -25
@@ 1,25 0,0 @@
-From 9019f3fb9c1a29ee0a04776d510f5e52cef6673b Mon Sep 17 00:00:00 2001
-From: Drew DeVault <sir@cmpwn.com>
-Date: Thu, 9 May 2019 15:18:38 -0400
-Subject: [PATCH 1/2] Don't strip whitespace from lines
-
----
- emailthreads/quotes.py | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/emailthreads/quotes.py b/emailthreads/quotes.py
-index d7ebe53..4dd6b5d 100644
---- a/emailthreads/quotes.py
-+++ b/emailthreads/quotes.py
-@@ -60,8 +60,6 @@ def parse_blocks(msg):
- block_lines = []
- was_quoted = False
- for (i, line) in enumerate(text_lines):
-- line = line.strip()
--
- line_quoted = line.startswith(">")
- if line_quoted:
- line = line[1:].lstrip()
---
-2.21.0
-
D sr.ht/py3-emailthreads/0002-Ignore-UTF-8-errors-when-decoding-emails.patch => sr.ht/py3-emailthreads/0002-Ignore-UTF-8-errors-when-decoding-emails.patch +0 -25
@@ 1,25 0,0 @@
-From e173a3de0bd23d72fe3bd1a98194c17add934365 Mon Sep 17 00:00:00 2001
-From: Drew DeVault <sir@cmpwn.com>
-Date: Thu, 9 May 2019 15:19:31 -0400
-Subject: [PATCH 2/2] Ignore UTF-8 errors when decoding emails
-
----
- emailthreads/threads.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/emailthreads/threads.py b/emailthreads/threads.py
-index 6b7c809..6f6a207 100644
---- a/emailthreads/threads.py
-+++ b/emailthreads/threads.py
-@@ -41,7 +41,7 @@ def normalize_whitespace(text):
-
- def get_text(msg):
- text_part = get_text_part(msg)
-- text = text_part.get_payload(decode=True).decode('utf-8')
-+ text = text_part.get_payload(decode=True).decode('utf-8', 'ignore')
- text = normalize_whitespace(text)
- return text
-
---
-2.21.0
-
M sr.ht/py3-emailthreads/APKBUILD => sr.ht/py3-emailthreads/APKBUILD +10 -12
@@ 1,29 1,27 @@
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=py3-emailthreads
-pkgver=0.1.0
-pkgrel=1
+pkgver=0.1.1
+pkgrel=0
pkgdesc="Python library to parse and format email threads"
url="https://github.com/emersion/python-emailthreads"
arch="noarch"
license="MIT"
depends="python3"
-makedepends="py-setuptools"
-source="
- $pkgname-$pkgver.tar.gz::https://github.com/emersion/python-emailthreads/archive/v$pkgver.tar.gz
- 0001-Don-t-strip-whitespace-from-lines.patch
- 0002-Ignore-UTF-8-errors-when-decoding-emails.patch
-"
+makedepends="py3-setuptools"
+checkdepends="py3-pytest"
+source="$pkgname-$pkgver.tar.gz::https://github.com/emersion/python-emailthreads/archive/v$pkgver.tar.gz"
builddir="$srcdir/python-emailthreads-${pkgver}"
-options="!check" # no upstream test suite
build() {
python3 setup.py build
}
+check() {
+ pytest-3
+}
+
package() {
python3 setup.py install --root="$pkgdir" --optimize=1
}
-sha512sums="42e7fb8dfbfcbe514c44324816eca4fbb859410e3548458f32a18560dd52514a9236d860a8397d76eb992c30a0807c93aff896e95296f1f932d3693e975124e7 py3-emailthreads-0.1.0.tar.gz
-467fda3c10394742d5a709addd2c24ff8eb27c294f912e651f1cf04e58802a501126d984b4d01323904aea4e216dd747cc681960c2157d04b6e21b0199c26bb2 0001-Don-t-strip-whitespace-from-lines.patch
-e023086d3974cbff2b848deeaab00d26d27a4f2b060b5b53350af9e23a20d1055d78dccd35ec06fc4ee039ca8e0d861b8084b8c1bbb95a776f652b4611cac0f7 0002-Ignore-UTF-8-errors-when-decoding-emails.patch"
+sha512sums="d0dafc0211a1aba88d891ac4dc533785716782ddfedb05436b68cefb84ae39efaa3a7a34ae3726e5215164eb59bf4f9dade2c19ddc83a6e946216952bb440c57 py3-emailthreads-0.1.1.tar.gz"