From 14c406339da6f5ff970b71c38f84218de51b423c Mon Sep 17 00:00:00 2001 From: Max Rees Date: Tue, 6 Aug 2019 07:41:23 -0500 Subject: user/py3-wcwidth: new package --- user/py3-wcwidth/APKBUILD | 34 ++++++++++++++++++++++++++++++++++ user/py3-wcwidth/run-tests.patch | 16 ++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 user/py3-wcwidth/APKBUILD create mode 100644 user/py3-wcwidth/run-tests.patch (limited to 'user') 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 +# Maintainer: Max Rees +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() -- cgit v1.2.3-60-g2f50