diff --git a/srcpkgs/python3-pyzstd/patches/support_pytest.patch b/srcpkgs/python3-pyzstd/patches/support_pytest.patch new file mode 100644 index 00000000000..05ffa75fab5 --- /dev/null +++ b/srcpkgs/python3-pyzstd/patches/support_pytest.patch @@ -0,0 +1,30 @@ +From b7ff78fc31ea054339693d6bf835134b8b9fbaa3 Mon Sep 17 00:00:00 2001 +From: Ma Lin +Date: Tue, 12 Apr 2022 13:00:30 +0800 +Subject: [PATCH] unittests supports pytest + + +--- + tests/test_zstd.py | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/tests/test_zstd.py b/tests/test_zstd.py +index 263a753..0d254b9 100644 +--- a/tests/test_zstd.py ++++ b/tests/test_zstd.py +@@ -3231,9 +3231,6 @@ def cb(a,b,c,d): + compress_stream(io.BytesIO(b''), io.BytesIO(), callback=cb) + decompress_stream(io.BytesIO(b''), io.BytesIO(), callback=cb) + +-def test_main(): +- unittest.main() +- + # uncompressed size 130KB, more than a zstd block. + # with a frame epilogue, 4 bytes checksum. + TEST_DAT_130KB = (b'(\xb5/\xfd\xa4\x00\x08\x02\x00\xcc\x87\x03:\xaaYN4pf\xc8\xae\x06b\x02' +@@ -4419,4 +4416,4 @@ def test_main(): + b'\xb7\x99\x1b\xce\xc9\t*\x98\x97\xb43z\x01h\x9fu\xf1') + + if __name__ == "__main__": +- test_main() ++ unittest.main() diff --git a/srcpkgs/python3-pyzstd/template b/srcpkgs/python3-pyzstd/template index 708b8a193d9..c097aeb44a0 100644 --- a/srcpkgs/python3-pyzstd/template +++ b/srcpkgs/python3-pyzstd/template @@ -1,6 +1,6 @@ # Template file for 'python3-pyzstd' pkgname=python3-pyzstd -version=0.15.0 +version=0.15.2 revision=1 wrksrc="pyzstd-${version}" build_style=python3-module @@ -8,14 +8,14 @@ make_build_args="--dynamic-link-zstd" hostmakedepends="python3-setuptools" makedepends="python3-devel libzstd-devel" depends="python3" +checkdepends="python3-pytest" short_desc="Python bindings to zstd, API is similar to bz2/lzma/zlib module" maintainer="Joel Beckmeyer " license="BSD-3-Clause" homepage="https://github.com/animalize/pyzstd" +changelog="https://raw.githubusercontent.com/animalize/pyzstd/dev/README.rst" distfiles="${PYPI_SITE}/p/pyzstd/pyzstd-${version}.tar.gz" -checksum=bf15a39cb3c9b662775e22ffa8c4da09fdde6a15ece5e0ed710b6d3b4329cf36 -# test is broken and can't be run by setup.py or pytest -make_check=no +checksum=eda9d2874a8f3823eea882125f304620f592693b3af0101c484bfc75726c8c59 post_install() { vlicense LICENSE