git: b165f773f4ed - main - textproc/py-ntc-templates: Update to 7.1.0

From: Kai Knoblich <kai_at_FreeBSD.org>
Date: Fri, 27 Sep 2024 13:55:41 UTC
The branch main has been updated by kai:

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

commit b165f773f4ed1a080a39c02b342d5bc031a71480
Author:     Kai Knoblich <kai@FreeBSD.org>
AuthorDate: 2024-09-27 13:47:41 +0000
Commit:     Kai Knoblich <kai@FreeBSD.org>
CommitDate: 2024-09-27 13:47:41 +0000

    textproc/py-ntc-templates: Update to 7.1.0
    
    * Re-add the tweak of 873eee30b8a6 for the existing patch so that it
      also contains the current version.
    
    Changelogs since 6.0.0:
    
    https://github.com/networktocode/ntc-templates/releases/tag/v7.1.0
    https://github.com/networktocode/ntc-templates/releases/tag/v7.0.0
---
 textproc/py-ntc-templates/Makefile                   |  5 ++++-
 textproc/py-ntc-templates/distinfo                   |  6 +++---
 textproc/py-ntc-templates/files/patch-pyproject.toml | 13 ++++++++++++-
 3 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/textproc/py-ntc-templates/Makefile b/textproc/py-ntc-templates/Makefile
index 1870b0bf6bda..99f864ab983b 100644
--- a/textproc/py-ntc-templates/Makefile
+++ b/textproc/py-ntc-templates/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	ntc-templates
 DISTVERSIONPREFIX=	v
-DISTVERSION=	6.0.0
+DISTVERSION=	7.1.0
 CATEGORIES=	textproc net-mgmt python
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
@@ -27,4 +27,7 @@ TEST_ENV=	PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
 
 NO_ARCH=	yes
 
+post-patch:
+	@${REINPLACE_CMD} -e 's|%%DISTVERSION%%|${DISTVERSION}|' ${WRKSRC}/pyproject.toml
+
 .include <bsd.port.mk>
diff --git a/textproc/py-ntc-templates/distinfo b/textproc/py-ntc-templates/distinfo
index 29488cc283dd..85730b61a599 100644
--- a/textproc/py-ntc-templates/distinfo
+++ b/textproc/py-ntc-templates/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1721275150
-SHA256 (networktocode-ntc-templates-v6.0.0_GH0.tar.gz) = f67701c01a86495f9b137a075f7806c381af5aa0fa91195d7960492e7aac5e2c
-SIZE (networktocode-ntc-templates-v6.0.0_GH0.tar.gz) = 1269154
+TIMESTAMP = 1727442242
+SHA256 (networktocode-ntc-templates-v7.1.0_GH0.tar.gz) = 580457e8147fb0088211a5a34719d28480d20fc0ca6fd0965e486c2685db37f5
+SIZE (networktocode-ntc-templates-v7.1.0_GH0.tar.gz) = 1477512
diff --git a/textproc/py-ntc-templates/files/patch-pyproject.toml b/textproc/py-ntc-templates/files/patch-pyproject.toml
index 027ad99c77e2..2512dc0160f3 100644
--- a/textproc/py-ntc-templates/files/patch-pyproject.toml
+++ b/textproc/py-ntc-templates/files/patch-pyproject.toml
@@ -1,8 +1,19 @@
+Use the actual version, otherwise it would lead to staging errors as the
+produced wheels contain the wrong version.
+
 Avoid installing "LICENSE" and "README.md" on top of Python's "site-packages/"
 directory which would lead to conflicting packages.
 
---- pyproject.toml.orig	2024-02-09 20:50:23 UTC
+--- pyproject.toml.orig	2024-09-18 13:56:50 UTC
 +++ pyproject.toml
+@@ -1,6 +1,6 @@ name = "ntc_templates"
+ [tool.poetry]
+ name = "ntc_templates"
+-version = "6.0.0"
++version = "%%DISTVERSION%%"
+ description = "TextFSM Templates for Network Devices, and Python wrapper for TextFSM's CliTable."
+ authors = ["Network to Code <info@networktocode.com>"]
+ license = "Apache-2.0"
 @@ -20,8 +20,6 @@ include = [
      "Programming Language :: Python :: 3.12",
  ]