aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/py3-chardet/440828f8faafdb58700c64a9ea8f6a30b154c08b.patch26
-rw-r--r--main/py3-chardet/APKBUILD14
2 files changed, 33 insertions, 7 deletions
diff --git a/main/py3-chardet/440828f8faafdb58700c64a9ea8f6a30b154c08b.patch b/main/py3-chardet/440828f8faafdb58700c64a9ea8f6a30b154c08b.patch
new file mode 100644
index 0000000000..c50feb1638
--- /dev/null
+++ b/main/py3-chardet/440828f8faafdb58700c64a9ea8f6a30b154c08b.patch
@@ -0,0 +1,26 @@
+https://github.com/chardet/chardet/commit/440828f8faafdb58700c64a9ea8f6a30b154c08b.patch
+
+From 440828f8faafdb58700c64a9ea8f6a30b154c08b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
+Date: Mon, 11 Nov 2019 21:02:51 +0100
+Subject: [PATCH] Support pytest 4, don't apply marks directly to parameters
+ (#174)
+
+Fixes https://github.com/chardet/chardet/issues/173
+---
+ test.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/test.py b/test.py
+index 9833307..ad2b753 100644
+--- a/test.py
++++ b/test.py
+@@ -59,7 +59,7 @@ def gen_test_params():
+ full_path = join(path, file_name)
+ test_case = full_path, encoding
+ if full_path in EXPECTED_FAILURES:
+- test_case = pytest.mark.xfail(test_case)
++ test_case = pytest.param(*test_case, marks=pytest.mark.xfail)
+ yield test_case
+
+
diff --git a/main/py3-chardet/APKBUILD b/main/py3-chardet/APKBUILD
index 134e9ac730..56c191c3e0 100644
--- a/main/py3-chardet/APKBUILD
+++ b/main/py3-chardet/APKBUILD
@@ -3,16 +3,15 @@
_pkgname=chardet
pkgname=py3-$_pkgname
pkgver=3.0.4
-pkgrel=3
+pkgrel=4
pkgdesc="The Universal Character Encoding Detector"
-options="!check" # Requires 'hypothesis'
url="https://github.com/chardet/chardet/"
arch="noarch"
license="LGPL-2.1-or-later"
-depends="python3"
-makedepends="py3-setuptools"
+depends="python3 py3-setuptools"
checkdepends="py3-pytest"
-source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz
+ 440828f8faafdb58700c64a9ea8f6a30b154c08b.patch"
builddir="$srcdir/$_pkgname-$pkgver"
replaces="py-chardet" # Backwards compatibility
@@ -23,11 +22,12 @@ build() {
}
check() {
- python3 setup.py test
+ python3 -m pytest
}
package() {
python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
}
-sha512sums="61a03b23447a2bfe52ceed4dd1b9afdb5784da1933a623776883ee9f297e341f633e27f0ce0230bd5fdc5fdb5382105ab42736a74a417ddeb9f83af57455dba5 chardet-3.0.4.tar.gz"
+sha512sums="61a03b23447a2bfe52ceed4dd1b9afdb5784da1933a623776883ee9f297e341f633e27f0ce0230bd5fdc5fdb5382105ab42736a74a417ddeb9f83af57455dba5 chardet-3.0.4.tar.gz
+6b4f87cca02579e2499b590e3bc85ef5afc5ced7a94af65af9669ed06a493deb01dd9a211bbc01d75fef2e7cb7b4157d3480afb32b113a24dd21e88aed8638ad 440828f8faafdb58700c64a9ea8f6a30b154c08b.patch"