textproc/py-backrefs: New port

Backrefs is a wrapper around Python's built-in Re and the 3rd party
Regex library.

Backrefs adds various additional back references (and a couple other
features) that are known to some regular expression engines, but not to
Python's Re and/or Regex.  The supported back references actually vary
depending on the regular expression engine being used as the engine may
already have support for some.
This commit is contained in:
Kai Knoblich 2025-03-07 14:37:26 +01:00
parent c354ace7cc
commit 230ddcbe05
4 changed files with 41 additions and 0 deletions

View file

@ -1338,6 +1338,7 @@
SUBDIR += py-asonic
SUBDIR += py-autopep8
SUBDIR += py-awesome-slugify
SUBDIR += py-backrefs
SUBDIR += py-bibtexparser
SUBDIR += py-bracex
SUBDIR += py-cchardet

View file

@ -0,0 +1,29 @@
PORTNAME= backrefs
DISTVERSION= 5.8
CATEGORIES= textproc python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= kai@FreeBSD.org
COMMENT= Wrapper around re and regex that adds additional back references
WWW= https://github.com/facelessuser/backrefs
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.md
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>=0.21.1:devel/py-hatchling@${PY_FLAVOR}
USES= python
USE_PYTHON= autoplist pep517 pytest
TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
NO_ARCH= yes
OPTIONS_DEFINE= EXTRAS
OPTIONS_DEFAULT= EXTRAS
EXTRAS_DESC= Support for bregex (a wrapper for the external Regex library)
EXTRAS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}regex>0:textproc/py-regex@${PY_FLAVOR}
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1741278890
SHA256 (backrefs-5.8.tar.gz) = 2cab642a205ce966af3dd4b38ee36009b31fa9502a35fd61d59ccc116e40a6bd
SIZE (backrefs-5.8.tar.gz) = 6773994

View file

@ -0,0 +1,8 @@
Backrefs is a wrapper around Python's built-in Re and the 3rd party Regex
library.
Backrefs adds various additional back references (and a couple other features)
that are known to some regular expression engines, but not to Python's Re
and/or Regex. The supported back references actually vary depending on the
regular expression engine being used as the engine may already have support for
some.