summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2019-08-06 07:41:23 -0500
committerMax Rees <maxcrees@me.com>2019-08-06 07:41:23 -0500
commit14c406339da6f5ff970b71c38f84218de51b423c (patch)
tree569fad6f01bd402a44fa815bf785f63b45dd469c /user
parentee3fa0e95d09e1a90a9157f184b877c90e0be4d8 (diff)
downloadpackages-14c406339da6f5ff970b71c38f84218de51b423c.tar.gz
packages-14c406339da6f5ff970b71c38f84218de51b423c.tar.bz2
packages-14c406339da6f5ff970b71c38f84218de51b423c.tar.xz
packages-14c406339da6f5ff970b71c38f84218de51b423c.zip
user/py3-wcwidth: new package
Diffstat (limited to 'user')
-rw-r--r--user/py3-wcwidth/APKBUILD34
-rw-r--r--user/py3-wcwidth/run-tests.patch16
2 files changed, 50 insertions, 0 deletions
diff --git a/user/py3-wcwidth/APKBUILD b/user/py3-wcwidth/APKBUILD
new file mode 100644
index 000000000..620c158e7
--- /dev/null
+++ b/user/py3-wcwidth/APKBUILD
@@ -0,0 +1,34 @@
+# Contributor: Max Rees <maxcrees@me.com>
+# Maintainer: Max Rees <maxcrees@me.com>
+pkgname=py3-wcwidth
+_pkgname=wcwidth
+_p="${_pkgname#?}"
+_p="${_pkgname%"$_p"}"
+pkgver=0.1.7
+pkgrel=0
+pkgdesc="Wide-character terminal column cell measurement"
+url="https://pypi.python.org/pypi/wcwidth"
+arch="noarch"
+# Certified net clean
+license="MIT"
+depends="python3"
+makedepends=""
+source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/$_p/$_pkgname/$_pkgname-$pkgver.tar.gz
+ run-tests.patch"
+builddir="$srcdir/$_pkgname-$pkgver"
+
+build() {
+ python3 setup.py build
+}
+
+check() {
+ PYTHONPATH="$builddir" python3 "$builddir/wcwidth/tests/test_core.py"
+}
+
+package() {
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+
+}
+
+sha512sums="5bc9625fbd10721a50a3ac7d7f91012cca8e4f83533f265cf56890498bc52a53b155c82e67d6bc5523a5593c8d7992a1dec2a0f590318170eddf987c56f9c368 py3-wcwidth-0.1.7.tar.gz
+f221823b0a7c70e45dd4cba806db5b463425e067f12395ec88370f884a652b1b3959a52d57b830dfe25229afb2d5ea9d8bd97c33c8a97766953f8458997c07f8 run-tests.patch"
diff --git a/user/py3-wcwidth/run-tests.patch b/user/py3-wcwidth/run-tests.patch
new file mode 100644
index 000000000..8d62e0962
--- /dev/null
+++ b/user/py3-wcwidth/run-tests.patch
@@ -0,0 +1,16 @@
+--- wcwidth-0.1.7/wcwidth/tests/test_core.py 2016-07-02 00:13:27.000000000 -0400
++++ wcwidth-0.1.7/wcwidth/tests/test_core.py 2019-08-06 08:38:15.420011741 -0400
+@@ -136,3 +136,13 @@ def test_combining_spacing():
+ # verify,
+ assert length_each == expect_length_each
+ assert length_phrase == expect_length_phrase
++
++if __name__ == "__main__":
++ test_hello_jp()
++ test_wcswidth_substr()
++ test_null_width_0()
++ test_control_c0_width_negative_1()
++ test_combining_width_negative_1()
++ test_combining_cafe()
++ test_combining_enclosing()
++ test_combining_spacing()