git: 12125cd6be63 - main - devel/py-calver: Add py-calver 2021.7.30

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sat, 16 Apr 2022 04:20:48 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=12125cd6be634ead2c12b161b1d74341de48270e

commit 12125cd6be634ead2c12b161b1d74341de48270e
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-04-16 03:39:02 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-04-16 04:19:03 +0000

    devel/py-calver: Add py-calver 2021.7.30
    
    The calver package is a setuptools extension for automatically defining your
    Python package version as a calendar version.
    
    WWW: https://github.com/di/calver
---
 devel/Makefile                       |  1 +
 devel/py-calver/Makefile             | 23 +++++++++++++++++++++++
 devel/py-calver/distinfo             |  3 +++
 devel/py-calver/files/patch-setup.py |  9 +++++++++
 devel/py-calver/pkg-descr            |  4 ++++
 5 files changed, 40 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index a5d72b66137d..f9d172eafab1 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4323,6 +4323,7 @@
     SUBDIR += py-cachetools3
     SUBDIR += py-cachy
     SUBDIR += py-cadquery-pywrap
+    SUBDIR += py-calver
     SUBDIR += py-canonicaljson
     SUBDIR += py-capstone
     SUBDIR += py-capturer
diff --git a/devel/py-calver/Makefile b/devel/py-calver/Makefile
new file mode 100644
index 000000000000..7c730eee18ab
--- /dev/null
+++ b/devel/py-calver/Makefile
@@ -0,0 +1,23 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+
+PORTNAME=	calver
+PORTVERSION=	2021.7.30
+CATEGORIES=	devel python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Setuptools extension for CalVer package versions
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		python:3.5+
+USE_PYTHON=	autoplist concurrent distutils
+
+NO_ARCH=	yes
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${WRKSRC}/setup.py
+
+.include <bsd.port.mk>
diff --git a/devel/py-calver/distinfo b/devel/py-calver/distinfo
new file mode 100644
index 000000000000..00c28be600a1
--- /dev/null
+++ b/devel/py-calver/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1649423642
+SHA256 (calver-2021.7.30.tar.gz) = 96e87452ccc8e169b95bdda643818aa0b46f1d469785452cb37cd0292f1b0b72
+SIZE (calver-2021.7.30.tar.gz) = 7688
diff --git a/devel/py-calver/files/patch-setup.py b/devel/py-calver/files/patch-setup.py
new file mode 100644
index 000000000000..aa7cee946069
--- /dev/null
+++ b/devel/py-calver/files/patch-setup.py
@@ -0,0 +1,9 @@
+--- setup.py.orig	2021-07-30 20:23:43 UTC
++++ setup.py
+@@ -30,5 +30,5 @@ setup(
+             "use_calver = calver.integration:version",
+         ],
+     },
+-    use_calver=True,
++    version='%%PORTVERSION%%',
+ )
diff --git a/devel/py-calver/pkg-descr b/devel/py-calver/pkg-descr
new file mode 100644
index 000000000000..9e2e68fde51d
--- /dev/null
+++ b/devel/py-calver/pkg-descr
@@ -0,0 +1,4 @@
+The calver package is a setuptools extension for automatically defining your
+Python package version as a calendar version.
+
+WWW: https://github.com/di/calver