From 212c396ac0c8be3114b160bfa7e3c2a102fb6709 Mon Sep 17 00:00:00 2001 From: k4leg Date: Wed, 1 Sep 2021 21:05:25 +0300 Subject: [PATCH] New package: python3-binaryornot-0.4.4 --- .../patches/0001-fix-failing-test.patch | 22 +++++++++++++++++++ srcpkgs/python3-binaryornot/template | 20 +++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 srcpkgs/python3-binaryornot/patches/0001-fix-failing-test.patch create mode 100644 srcpkgs/python3-binaryornot/template diff --git a/srcpkgs/python3-binaryornot/patches/0001-fix-failing-test.patch b/srcpkgs/python3-binaryornot/patches/0001-fix-failing-test.patch new file mode 100644 index 00000000000..2070485b6a0 --- /dev/null +++ b/srcpkgs/python3-binaryornot/patches/0001-fix-failing-test.patch @@ -0,0 +1,22 @@ +From 38dee57986c6679d9936a1da6f6c8182da3734f8 Mon Sep 17 00:00:00 2001 +From: Greg +Date: Sat, 10 Aug 2019 15:10:33 +0000 +Subject: [PATCH] fix failing test + +--- + tests/test_check.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_check.py b/tests/test_check.py +index 1ea31a4..f800583 100755 +--- a/tests/test_check.py ++++ b/tests/test_check.py +@@ -216,7 +216,7 @@ def bytes_in_file(data): + + + class TestDetectionProperties(unittest.TestCase): +- @given(binary(average_size=512)) ++ @given(binary(max_size=512)) + def test_never_crashes(self, data): + with bytes_in_file(data) as f: + is_binary(f) diff --git a/srcpkgs/python3-binaryornot/template b/srcpkgs/python3-binaryornot/template new file mode 100644 index 00000000000..56b30d88215 --- /dev/null +++ b/srcpkgs/python3-binaryornot/template @@ -0,0 +1,20 @@ +# Template file for 'python3-binaryornot' +pkgname=python3-binaryornot +version=0.4.4 +revision=1 +wrksrc="binaryornot-${version}" +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-chardet" +checkdepends="python3-hypothesis $depends" +short_desc="Pure Python package to check if a file is binary or text" +maintainer="k4leg " +license="BSD-3-Clause" +homepage="https://github.com/audreyfeldroy/binaryornot" +changelog="https://raw.githubusercontent.com/audreyfeldroy/binaryornot/master/HISTORY.rst" +distfiles="${PYPI_SITE}/b/binaryornot/binaryornot-${version}.tar.gz" +checksum=359501dfc9d40632edc9fac890e19542db1a287bbcfa58175b66658392018061 + +post_install() { + vlicense LICENSE +}