git: 09af7cb4490e - main - textproc/py-bistring: Add py-bistring 0.5.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sun, 18 May 2025 03:36:44 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=09af7cb4490e82d7debd9386411faf073e316756

commit 09af7cb4490e82d7debd9386411faf073e316756
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2025-05-18 03:14:49 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2025-05-18 03:14:49 +0000

    textproc/py-bistring: Add py-bistring 0.5.0
    
    The bistring library provides non-destructive versions of common string
    processing operations like normalization, case folding, and find/replace. Each
    bistring remembers the original string, and how its substrings map to substrings
    of the modified version.
---
 textproc/Makefile                         |  1 +
 textproc/py-bistring/Makefile             | 23 +++++++++++++++++++++++
 textproc/py-bistring/distinfo             |  3 +++
 textproc/py-bistring/files/patch-setup.py | 10 ++++++++++
 textproc/py-bistring/pkg-descr            |  4 ++++
 5 files changed, 41 insertions(+)

diff --git a/textproc/Makefile b/textproc/Makefile
index 8a1f69c95a79..db7eb563953c 100644
--- a/textproc/Makefile
+++ b/textproc/Makefile
@@ -1321,6 +1321,7 @@
     SUBDIR += py-awesome-slugify
     SUBDIR += py-backrefs
     SUBDIR += py-bibtexparser
+    SUBDIR += py-bistring
     SUBDIR += py-bracex
     SUBDIR += py-cchardet
     SUBDIR += py-chameleon
diff --git a/textproc/py-bistring/Makefile b/textproc/py-bistring/Makefile
new file mode 100644
index 000000000000..cc532823826d
--- /dev/null
+++ b/textproc/py-bistring/Makefile
@@ -0,0 +1,23 @@
+PORTNAME=	bistring
+PORTVERSION=	0.5.0
+CATEGORIES=	textproc python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Bidirectionally transformed strings
+WWW=		https://bistring.readthedocs.io/en/latest/ \
+		https://github.com/microsoft/bistring
+
+LICENSE=	MIT
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pyicu>=0:devel/py-pyicu@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist concurrent pep517
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/textproc/py-bistring/distinfo b/textproc/py-bistring/distinfo
new file mode 100644
index 000000000000..e8e1a84575d4
--- /dev/null
+++ b/textproc/py-bistring/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1745936012
+SHA256 (bistring-0.5.0.tar.gz) = ac3f583d720d41fade1762894fe3b43711b75146d6230b1b9bfe23776774b8e8
+SIZE (bistring-0.5.0.tar.gz) = 19592
diff --git a/textproc/py-bistring/files/patch-setup.py b/textproc/py-bistring/files/patch-setup.py
new file mode 100644
index 000000000000..3cada39fcb6b
--- /dev/null
+++ b/textproc/py-bistring/files/patch-setup.py
@@ -0,0 +1,10 @@
+--- setup.py.orig	2022-03-14 19:32:46 UTC
++++ setup.py
+@@ -43,7 +43,6 @@ setup(
+     test_suite='tests',
+     python_requires='>=3.7',
+     setup_requires=[
+-        'pytest-runner',
+     ],
+     install_requires=[
+         'pyicu',
diff --git a/textproc/py-bistring/pkg-descr b/textproc/py-bistring/pkg-descr
new file mode 100644
index 000000000000..1246f8e6bd04
--- /dev/null
+++ b/textproc/py-bistring/pkg-descr
@@ -0,0 +1,4 @@
+The bistring library provides non-destructive versions of common string
+processing operations like normalization, case folding, and find/replace. Each
+bistring remembers the original string, and how its substrings map to substrings
+of the modified version.