git: 66e0f308ab5d - main - devel/py-isoduration: Add py-isoduration 20.11.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Tue, 21 Mar 2023 19:23:50 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=66e0f308ab5de0144a198cd6cf410a2dc1c6b8a7

commit 66e0f308ab5de0144a198cd6cf410a2dc1c6b8a7
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-03-21 18:35:09 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-03-21 19:19:51 +0000

    devel/py-isoduration: Add py-isoduration 20.11.0
    
    ISO 8601 is most commonly known as a way to exchange datetimes in textual
    format. A lesser known aspect of the standard is the representation of
    durations. They have a shape similar to this:
        P3Y6M4DT12H30M5S
    This string represents a duration of 3 years, 6 months, 4 days, 12 hours, 30
    minutes, and 5 seconds.
    
    The state of the art of ISO 8601 duration handling in Python is more or less
    limited to what's offered by isodate. What we are trying to achieve here is to
    address the shortcomings of isodate (as described in their own Limitations
    section), and a few of our own annoyances with their interface, such as the lack
    of uniformity in their handling of types, and the use of regular expressions for
    parsing.
---
 devel/Makefile                 |  1 +
 devel/py-isoduration/Makefile  | 21 +++++++++++++++++++++
 devel/py-isoduration/distinfo  |  3 +++
 devel/py-isoduration/pkg-descr | 13 +++++++++++++
 4 files changed, 38 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 00f20e6c239e..45e3b4421efb 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4746,6 +4746,7 @@
     SUBDIR += py-ipywidgets
     SUBDIR += py-iso8601
     SUBDIR += py-isodate
+    SUBDIR += py-isoduration
     SUBDIR += py-isort
     SUBDIR += py-itanium_demangler
     SUBDIR += py-itemadapter
diff --git a/devel/py-isoduration/Makefile b/devel/py-isoduration/Makefile
new file mode 100644
index 000000000000..f8144ce71f4f
--- /dev/null
+++ b/devel/py-isoduration/Makefile
@@ -0,0 +1,21 @@
+PORTNAME=	isoduration
+PORTVERSION=	20.11.0
+CATEGORIES=	devel python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Operations with ISO 8601 durations
+WWW=		https://github.com/bolsote/isoduration
+
+LICENSE=	ISCL
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}arrow>=0.15.0:devel/py-arrow@${PY_FLAVOR}
+
+USES=		python:3.7+
+USE_PYTHON=	autoplist concurrent distutils
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/devel/py-isoduration/distinfo b/devel/py-isoduration/distinfo
new file mode 100644
index 000000000000..f06beacdee9c
--- /dev/null
+++ b/devel/py-isoduration/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1677770929
+SHA256 (isoduration-20.11.0.tar.gz) = ac2f9015137935279eac671f94f89eb00584f940f5dc49462a0c4ee692ba1bd9
+SIZE (isoduration-20.11.0.tar.gz) = 11649
diff --git a/devel/py-isoduration/pkg-descr b/devel/py-isoduration/pkg-descr
new file mode 100644
index 000000000000..bea78f28a3d7
--- /dev/null
+++ b/devel/py-isoduration/pkg-descr
@@ -0,0 +1,13 @@
+ISO 8601 is most commonly known as a way to exchange datetimes in textual
+format. A lesser known aspect of the standard is the representation of
+durations. They have a shape similar to this:
+    P3Y6M4DT12H30M5S
+This string represents a duration of 3 years, 6 months, 4 days, 12 hours, 30
+minutes, and 5 seconds.
+
+The state of the art of ISO 8601 duration handling in Python is more or less
+limited to what's offered by isodate. What we are trying to achieve here is to
+address the shortcomings of isodate (as described in their own Limitations
+section), and a few of our own annoyances with their interface, such as the lack
+of uniformity in their handling of types, and the use of regular expressions for
+parsing.