diff --git a/bypy/linux/__main__.py b/bypy/linux/__main__.py index 025a47e02c..1c13f5b53c 100644 --- a/bypy/linux/__main__.py +++ b/bypy/linux/__main__.py @@ -46,7 +46,7 @@ def binary_includes(): ('usb-1.0 mtp expat sqlite3 ffi z lzma openjp2 poppler dbus-1 iconv xml2 xslt jpeg png16' ' webp webpmux webpdemux exslt ncursesw readline chm hunspell-1.7 hyphen' ' icudata icui18n icuuc icuio stemmer gcrypt gpg-error uchardet graphite2' - ' brotlicommon brotlidec brotlienc' + ' brotlicommon brotlidec brotlienc zstd' ' gobject-2.0 glib-2.0 gthread-2.0 gmodule-2.0 gio-2.0 dbus-glib-1').split() )) + [ # debian/ubuntu for for some typical stupid reason use libpcre.so.3 diff --git a/bypy/macos/__main__.py b/bypy/macos/__main__.py index 497ea0828f..d0cef9a15e 100644 --- a/bypy/macos/__main__.py +++ b/bypy/macos/__main__.py @@ -529,7 +529,7 @@ class Freeze: 'usb-1.0.0', 'mtp.9', 'chm.0', 'sqlite3.0', 'hunspell-1.7.0', 'icudata.70', 'icui18n.70', 'icuio.70', 'icuuc.70', 'hyphen.0', 'uchardet.0', 'stemmer.0', 'xslt.1', 'exslt.0', 'xml2.2', 'z.1', 'unrar', 'lzma.5', - 'brotlicommon.1', 'brotlidec.1', 'brotlienc.1', + 'brotlicommon.1', 'brotlidec.1', 'brotlienc.1', 'zstd.1', 'crypto.1.1', 'ssl.1.1', 'iconv.2', # 'ltdl.7' ): print('\nAdding', x) diff --git a/bypy/sources.json b/bypy/sources.json index 4580ec79f7..a8cc0dbb9d 100644 --- a/bypy/sources.json +++ b/bypy/sources.json @@ -106,6 +106,14 @@ } }, + { + "name": "zstd", + "unix": { + "filename": "zstd-1.5.5.tar.gz", + "hash": "sha256:9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4", + "urls": ["https://github.com/facebook/zstd/releases/download/v1.5.5/{filename}"] + } + }, { "name": "expat", @@ -853,8 +861,8 @@ "name": "pyzstd", "comment": "Needed by py7zr", "unix": { - "filename": "pyzstd-0.15.0.tar.gz", - "hash": "sha256:bf15a39cb3c9b662775e22ffa8c4da09fdde6a15ece5e0ed710b6d3b4329cf36", + "filename": "pyzstd-0.15.6.tar.gz", + "hash": "sha256:32a1b67d5340d8df381e718a788417455edd76bed7e8a4cbd259acdc30b5e17e", "urls": ["pypi"] } }, diff --git a/src/calibre/test_build.py b/src/calibre/test_build.py index ad1e223347..d504d748d6 100644 --- a/src/calibre/test_build.py +++ b/src/calibre/test_build.py @@ -96,6 +96,12 @@ class BuildTest(unittest.TestCase): import lzma lzma.open + def test_zstd(self): + from pyzstd import compress, decompress + data = os.urandom(4096) + cdata = compress(data) + self.assertEqual(data, decompress(cdata)) + def test_html5lib(self): import html5lib.html5parser # noqa from html5lib import parse # noqa