aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesús Daniel Colmenares Oviedo <DtxdF@disroot.org>2023-04-10 23:33:30 +0000
committerRobert Clausecker <fuz@FreeBSD.org>2023-04-30 18:41:44 +0000
commit4dc6444322ea7e531a3c2bfbc87911295daff4ec (patch)
tree2b9cf7933a215f0faa7b2e0e1a05d382de6c9067
parent0b23819f46828089194537e0a085e9c8163c0cc5 (diff)
archivers/py-zipstream-ng: New port: streamable zip file generator
zipstream-ng is a modern and easy to use streamable zip file generator. It can package and stream many files and folders on the fly without needing temporary files or excessive memory. Includes the ability to calculate the total size of the stream before any data is actually added (provided no compression is used). This makes it ideal for use in web applications since the total size can be used to set the `Content-Length` header without having to generate the entire file first. Features: * Generates zip data on the fly as it's requested. * Can calculate the total size of the resulting zip file before generation even begins. * Flexible API: Typical use cases are simple, complicated ones are possible. * Supports zipping data from files, bytes, strings, and any other iterable objects. * Threadsafe: Won't mangle data if multiple threads concurrently add/read data to/from the same stream. * Includes a clone of Python's `http.server` module with zip support added. Try `python -m zipstream.server`. * Automatically uses Zip64 extensions, but only if they are required. * No external dependencies. WWW: https://github.com/pR0Ps/zipstream-ng/ PR: 270750
-rw-r--r--archivers/Makefile1
-rw-r--r--archivers/py-zipstream-ng/Makefile19
-rw-r--r--archivers/py-zipstream-ng/distinfo3
-rw-r--r--archivers/py-zipstream-ng/pkg-descr23
4 files changed, 46 insertions, 0 deletions
diff --git a/archivers/Makefile b/archivers/Makefile
index 681b33f78d51..f76683b042aa 100644
--- a/archivers/Makefile
+++ b/archivers/Makefile
@@ -204,6 +204,7 @@
SUBDIR += py-sozipfile
SUBDIR += py-warctools
SUBDIR += py-xopen
+ SUBDIR += py-zipstream-ng
SUBDIR += py-zopfli
SUBDIR += py-zstandard
SUBDIR += py-zstd
diff --git a/archivers/py-zipstream-ng/Makefile b/archivers/py-zipstream-ng/Makefile
new file mode 100644
index 000000000000..51e4dddb1b6e
--- /dev/null
+++ b/archivers/py-zipstream-ng/Makefile
@@ -0,0 +1,19 @@
+PORTNAME= zipstream-ng
+DISTVERSION= 1.5.0
+CATEGORIES= archivers python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= DtxdF@disroot.org
+COMMENT= Modern and easy to use streamable zip file generator
+WWW= https://github.com/pR0Ps/zipstream-ng/
+
+LICENSE= LGPL3
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest-cov>0:devel/py-pytest-cov@${PY_FLAVOR}
+
+USES= python:3.5+
+USE_PYTHON= autoplist distutils pytest
+
+.include <bsd.port.mk>
diff --git a/archivers/py-zipstream-ng/distinfo b/archivers/py-zipstream-ng/distinfo
new file mode 100644
index 000000000000..d8566f790f37
--- /dev/null
+++ b/archivers/py-zipstream-ng/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1680566521
+SHA256 (zipstream-ng-1.5.0.tar.gz) = ff02b1dac4ef8b4acba70a2c986991e9acd4cfab9c6fa966da9133f0a7015863
+SIZE (zipstream-ng-1.5.0.tar.gz) = 32399
diff --git a/archivers/py-zipstream-ng/pkg-descr b/archivers/py-zipstream-ng/pkg-descr
new file mode 100644
index 000000000000..162071cbf7c9
--- /dev/null
+++ b/archivers/py-zipstream-ng/pkg-descr
@@ -0,0 +1,23 @@
+zipstream-ng is a modern and easy to use streamable zip file
+generator. It can package and stream many files and folders on the
+fly without needing temporary files or excessive memory.
+
+Includes the ability to calculate the total size of the stream
+before any data is actually added (provided no compression is used).
+This makes it ideal for use in web applications since the total
+size can be used to set the `Content-Length` header without having
+to generate the entire file first.
+
+Features:
+ * Generates zip data on the fly as it's requested.
+ * Can calculate the total size of the resulting zip file before generation even
+ begins.
+ * Flexible API: Typical use cases are simple, complicated ones are possible.
+ * Supports zipping data from files, bytes, strings, and any other iterable
+ objects.
+ * Threadsafe: Won't mangle data if multiple threads concurrently add/read data
+ to/from the same stream.
+ * Includes a clone of Python's `http.server` module with zip support added.
+ Try `python -m zipstream.server`.
+ * Automatically uses Zip64 extensions, but only if they are required.
+ * No external dependencies.