From 57a080bd894b513f470490282f68ab90ab42a8fc Mon Sep 17 00:00:00 2001 From: Sunpoet Po-Chuan Hsieh Date: Tue, 26 Jan 2021 17:19:22 +0000 Subject: [PATCH] Add py-cwcwidth 0.1.1 cwcwidth provides Python bindings for wcwidth and wcswidth functions defined in POSIX.1-2001 and POSIX.1-2008 based on Cython. These functions compute the printable length of a unicode character/string on a terminal. The module provides the same functions as wcwidth and its behavior is compatible. On systems not conforming to POSIX.1-2001 and POSIX.1-2008, Markus Kuhn's implementation is used to provide the functionality. WWW: https://github.com/sebastinas/cwcwidth --- devel/Makefile | 3 ++- devel/py-cwcwidth/Makefile | 24 ++++++++++++++++++++++++ devel/py-cwcwidth/distinfo | 3 +++ devel/py-cwcwidth/pkg-descr | 9 +++++++++ 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 devel/py-cwcwidth/Makefile create mode 100644 devel/py-cwcwidth/distinfo create mode 100644 devel/py-cwcwidth/pkg-descr diff --git a/devel/Makefile b/devel/Makefile index bc0ee3e0c639..1da73449ab3d 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4300,6 +4300,7 @@ SUBDIR += py-curio SUBDIR += py-cursive SUBDIR += py-curtsies + SUBDIR += py-cwcwidth SUBDIR += py-cxx SUBDIR += py-cycler SUBDIR += py-cymem @@ -6861,8 +6862,8 @@ SUBDIR += tortoisehg SUBDIR += tpasm SUBDIR += tradcpp - SUBDIR += transwarp SUBDIR += transient + SUBDIR += transwarp SUBDIR += treepy.el SUBDIR += trellis SUBDIR += trio diff --git a/devel/py-cwcwidth/Makefile b/devel/py-cwcwidth/Makefile new file mode 100644 index 000000000000..015550527c1c --- /dev/null +++ b/devel/py-cwcwidth/Makefile @@ -0,0 +1,24 @@ +# Created by: Po-Chuan Hsieh +# $FreeBSD$ + +PORTNAME= cwcwidth +PORTVERSION= 0.1.1 +CATEGORIES= devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Python bindings for wc(s)width + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cython>=0.28:lang/cython@${PY_FLAVOR} + +USES= python:3.6+ +USE_PYTHON= autoplist concurrent cython distutils + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/cwcwidth/_impl*.so + +.include diff --git a/devel/py-cwcwidth/distinfo b/devel/py-cwcwidth/distinfo new file mode 100644 index 000000000000..8841f35b9108 --- /dev/null +++ b/devel/py-cwcwidth/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1611665287 +SHA256 (cwcwidth-0.1.1.tar.gz) = 042cdf80d80a836935f700d8e1c34270f82a627fc07f7b5ec1e8cec486e1d755 +SIZE (cwcwidth-0.1.1.tar.gz) = 35722 diff --git a/devel/py-cwcwidth/pkg-descr b/devel/py-cwcwidth/pkg-descr new file mode 100644 index 000000000000..f88af14b8f65 --- /dev/null +++ b/devel/py-cwcwidth/pkg-descr @@ -0,0 +1,9 @@ +cwcwidth provides Python bindings for wcwidth and wcswidth functions defined in +POSIX.1-2001 and POSIX.1-2008 based on Cython. These functions compute the +printable length of a unicode character/string on a terminal. The module +provides the same functions as wcwidth and its behavior is compatible. + +On systems not conforming to POSIX.1-2001 and POSIX.1-2008, Markus Kuhn's +implementation is used to provide the functionality. + +WWW: https://github.com/sebastinas/cwcwidth