git: 92223841af27 - main - devel/py-expandvars: Add py-expandvars 0.12.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 25 Dec 2023 09:08:11 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=92223841af27c549e0c452611f5f37b99a635ab2

commit 92223841af27c549e0c452611f5f37b99a635ab2
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-12-25 08:56:51 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-12-25 08:56:51 +0000

    devel/py-expandvars: Add py-expandvars 0.12.0
    
    expandvars is inspired by GNU bash's variable expansion features. It can be used
    as an alternative to Python's os.path.expandvars function.
    
    A good use case is reading config files with the flexibility of reading values
    from environment variables using advanced features like returning a default
    value if some variable is not defined.
---
 devel/Makefile                |  1 +
 devel/py-expandvars/Makefile  | 21 +++++++++++++++++++++
 devel/py-expandvars/distinfo  |  3 +++
 devel/py-expandvars/pkg-descr |  6 ++++++
 4 files changed, 31 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 5d9c76e0a56f..4f8f0c5af730 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4650,6 +4650,7 @@
     SUBDIR += py-exam
     SUBDIR += py-exceptiongroup
     SUBDIR += py-executing
+    SUBDIR += py-expandvars
     SUBDIR += py-expiringdict
     SUBDIR += py-extras
     SUBDIR += py-extremes
diff --git a/devel/py-expandvars/Makefile b/devel/py-expandvars/Makefile
new file mode 100644
index 000000000000..0aefcb159004
--- /dev/null
+++ b/devel/py-expandvars/Makefile
@@ -0,0 +1,21 @@
+PORTNAME=	expandvars
+PORTVERSION=	0.12.0
+CATEGORIES=	devel python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Expand system variables Unix style
+WWW=		https://github.com/sayanarijit/expandvars
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist concurrent pep517
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/devel/py-expandvars/distinfo b/devel/py-expandvars/distinfo
new file mode 100644
index 000000000000..a0539ae71915
--- /dev/null
+++ b/devel/py-expandvars/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1703227788
+SHA256 (expandvars-0.12.0.tar.gz) = 7d1adfa55728cf4b5d812ece3d087703faea953e0c0a1a78415de9df5024d844
+SIZE (expandvars-0.12.0.tar.gz) = 10909
diff --git a/devel/py-expandvars/pkg-descr b/devel/py-expandvars/pkg-descr
new file mode 100644
index 000000000000..fa28c0fa3770
--- /dev/null
+++ b/devel/py-expandvars/pkg-descr
@@ -0,0 +1,6 @@
+expandvars is inspired by GNU bash's variable expansion features. It can be used
+as an alternative to Python's os.path.expandvars function.
+
+A good use case is reading config files with the flexibility of reading values
+from environment variables using advanced features like returning a default
+value if some variable is not defined.