git: d7dae55775cc - main - mail/py-imaplib2: Threaded Python IMAP4 client (new port)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 27 Dec 2022 14:50:59 UTC
The branch main has been updated by pi:
URL: https://cgit.FreeBSD.org/ports/commit/?id=d7dae55775cc194a78e021b72da3a4348f9dbfab
commit d7dae55775cc194a78e021b72da3a4348f9dbfab
Author: Derek Schrock <dereks@lifeofadishwasher.com>
AuthorDate: 2022-12-27 14:49:19 +0000
Commit: Kurt Jaeger <pi@FreeBSD.org>
CommitDate: 2022-12-27 14:49:19 +0000
mail/py-imaplib2: Threaded Python IMAP4 client (new port)
Based on RFC 3501 and original imaplib module.
This is a version of imaplib that uses threads to allow full use of
the IMAP4 concurrency features, and to de-couple a user of imaplib
from i/o lags, except where explicitly allowed.
PR: 262232
Author: Derek Schrock <dereks@lifeofadishwasher.com>
Differential Revision: https://reviews.freebsd.org/D34390
---
mail/Makefile | 1 +
mail/py-imaplib2/Makefile | 25 +++++++++++++++++++++++++
mail/py-imaplib2/distinfo | 3 +++
mail/py-imaplib2/files/test_imports.py | 8 ++++++++
mail/py-imaplib2/pkg-descr | 5 +++++
5 files changed, 42 insertions(+)
diff --git a/mail/Makefile b/mail/Makefile
index 285f1c29d3d1..2ce4e39f4fdc 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -505,6 +505,7 @@
SUBDIR += py-flufl.bounce
SUBDIR += py-fuglu
SUBDIR += py-imapclient
+ SUBDIR += py-imaplib2
SUBDIR += py-mail-parser
SUBDIR += py-mailmanclient
SUBDIR += py-mailnag
diff --git a/mail/py-imaplib2/Makefile b/mail/py-imaplib2/Makefile
new file mode 100644
index 000000000000..3346b1d56e99
--- /dev/null
+++ b/mail/py-imaplib2/Makefile
@@ -0,0 +1,25 @@
+PORTNAME= imaplib2
+PORTVERSION= 3.6
+CATEGORIES= mail python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= dereks@lifeofadishwasher.com
+COMMENT= Threaded Python IMAP4 client
+WWW= https://github.com/jazzband/imaplib2/
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENCE
+
+USES= pytest python:3.6-3.9
+USE_PYTHON= autoplist distutils
+
+NO_ARCH= yes
+
+# Copy tests until a new release
+# https://github.com/jazzband/imaplib2/pull/38
+post-extract:
+ @${MKDIR} ${WRKSRC}/${PORTNAME}/tests
+ @${CP} ${FILESDIR}/test_imports.py ${WRKSRC}/${PORTNAME}/tests/
+
+.include <bsd.port.mk>
diff --git a/mail/py-imaplib2/distinfo b/mail/py-imaplib2/distinfo
new file mode 100644
index 000000000000..e773d2ea4d8c
--- /dev/null
+++ b/mail/py-imaplib2/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1645916681
+SHA256 (imaplib2-3.6.tar.gz) = 96cb485b31868a242cb98d5c5dc67b39b22a6359f30316de536060488e581e5b
+SIZE (imaplib2-3.6.tar.gz) = 26252
diff --git a/mail/py-imaplib2/files/test_imports.py b/mail/py-imaplib2/files/test_imports.py
new file mode 100644
index 000000000000..9243718034b1
--- /dev/null
+++ b/mail/py-imaplib2/files/test_imports.py
@@ -0,0 +1,8 @@
+def test_import_normally():
+ from imaplib2 import IMAP4_SSL
+ assert IMAP4_SSL
+
+
+def test_import_hack():
+ from imaplib2.imaplib2 import IMAP4_SSL
+ assert IMAP4_SSL
diff --git a/mail/py-imaplib2/pkg-descr b/mail/py-imaplib2/pkg-descr
new file mode 100644
index 000000000000..a9cba87ba71f
--- /dev/null
+++ b/mail/py-imaplib2/pkg-descr
@@ -0,0 +1,5 @@
+Based on RFC 3501 and original imaplib module.
+
+This is a version of imaplib that uses threads to allow full use of
+the IMAP4 concurrency features, and to de-couple a user of imaplib
+from i/o lags, except where explicitly allowed.