aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2025-05-18 03:14:49 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2025-05-18 03:14:49 +0000
commit09af7cb4490e82d7debd9386411faf073e316756 (patch)
tree499077b505dd3f8c99729744a9ac150169906cc5
parent12724cb10462b83697a9a800cfc38216c93c2faa (diff)
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.
-rw-r--r--textproc/Makefile1
-rw-r--r--textproc/py-bistring/Makefile23
-rw-r--r--textproc/py-bistring/distinfo3
-rw-r--r--textproc/py-bistring/files/patch-setup.py10
-rw-r--r--textproc/py-bistring/pkg-descr4
5 files changed, 41 insertions, 0 deletions
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.