git: 1860118328b2 - main - devel/py-setuptools-git-versioning: Add py-setuptools-git-versioning 1.13.5

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Thu, 05 Oct 2023 02:01:04 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1860118328b25ff01d71c5995c8dc44248f4afe3

commit 1860118328b25ff01d71c5995c8dc44248f4afe3
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-10-05 01:53:29 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-10-05 01:53:29 +0000

    devel/py-setuptools-git-versioning: Add py-setuptools-git-versioning 1.13.5
    
    Use git repo data (latest tag, current commit hash, etc) for building a version
    number according PEP 440.
    
    Features:
    - Can be installed & configured through both setup.py and PEP 518's
      pyproject.toml
    - Does not require to change source code of the project
    - Tag-, file-, and callback-based versioning schemas are supported
    - Templates for tag, dev and dirty versions are separated
    - Templates support a lot of substitutions including git and environment
      information
    - Well-documented
---
 devel/Makefile                               |  1 +
 devel/py-setuptools-git-versioning/Makefile  | 32 ++++++++++++++++++++++++++++
 devel/py-setuptools-git-versioning/distinfo  |  3 +++
 devel/py-setuptools-git-versioning/pkg-descr | 12 +++++++++++
 4 files changed, 48 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 9e23a283cbd1..f85b0ed93bc6 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -5578,6 +5578,7 @@
     SUBDIR += py-setuptools-declarative-requirements
     SUBDIR += py-setuptools-gettext
     SUBDIR += py-setuptools-git
+    SUBDIR += py-setuptools-git-versioning
     SUBDIR += py-setuptools-pkg
     SUBDIR += py-setuptools-rust
     SUBDIR += py-setuptools44
diff --git a/devel/py-setuptools-git-versioning/Makefile b/devel/py-setuptools-git-versioning/Makefile
new file mode 100644
index 000000000000..c545f6f3049b
--- /dev/null
+++ b/devel/py-setuptools-git-versioning/Makefile
@@ -0,0 +1,32 @@
+PORTNAME=	setuptools-git-versioning
+PORTVERSION=	1.13.5
+CATEGORIES=	devel python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Use git repo data for building a version number according PEP-440
+WWW=		https://setuptools-git-versioning.readthedocs.io/en/stable/ \
+		https://github.com/dolfinus/setuptools-git-versioning
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}packaging>=0:devel/py-packaging@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}packaging>=0:devel/py-packaging@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist concurrent distutils
+
+NO_ARCH=	yes
+
+.include <bsd.port.pre.mk>
+
+.if ${PYTHON_REL} < 31100
+BUILD_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}toml>=0.10.2:textproc/py-toml@${PY_FLAVOR}
+RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}toml>=0.10.2:textproc/py-toml@${PY_FLAVOR}
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/devel/py-setuptools-git-versioning/distinfo b/devel/py-setuptools-git-versioning/distinfo
new file mode 100644
index 000000000000..f8616eabbf77
--- /dev/null
+++ b/devel/py-setuptools-git-versioning/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1696432866
+SHA256 (setuptools-git-versioning-1.13.5.tar.gz) = af9ad1e8103b5abb5b128c2db4fef99407328ac9c12f65d3ff9550c4bb39ad1c
+SIZE (setuptools-git-versioning-1.13.5.tar.gz) = 10767
diff --git a/devel/py-setuptools-git-versioning/pkg-descr b/devel/py-setuptools-git-versioning/pkg-descr
new file mode 100644
index 000000000000..25e3b88dd7b6
--- /dev/null
+++ b/devel/py-setuptools-git-versioning/pkg-descr
@@ -0,0 +1,12 @@
+Use git repo data (latest tag, current commit hash, etc) for building a version
+number according PEP 440.
+
+Features:
+- Can be installed & configured through both setup.py and PEP 518's
+  pyproject.toml
+- Does not require to change source code of the project
+- Tag-, file-, and callback-based versioning schemas are supported
+- Templates for tag, dev and dirty versions are separated
+- Templates support a lot of substitutions including git and environment
+  information
+- Well-documented