Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Feb 2023 18:48:43 GMT
From:      Kai Knoblich <kai@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: f73094c9a4f1 - main - textproc/py-ntc-templates: Update to 3.2.0
Message-ID:  <202302231848.31NImhfY048743@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kai:

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

commit f73094c9a4f145b8718b86701a9025e357fd1242
Author:     Kai Knoblich <kai@FreeBSD.org>
AuthorDate: 2023-02-23 18:45:34 +0000
Commit:     Kai Knoblich <kai@FreeBSD.org>
CommitDate: 2023-02-23 18:48:32 +0000

    textproc/py-ntc-templates: Update to 3.2.0
    
    * Switch to the PEP-517 build framework and remove the setuptools
      workaround.
    
    * Also convert "do-test" target to USE_PYTHON=pytest while I'm here.
    
    Changelog:
    
    https://github.com/networktocode/ntc-templates/compare/v3.1.0...v3.2.0
    
    MFH:            No (PEP-517 support not present in the 2023Q1 branch)
---
 textproc/py-ntc-templates/Makefile                 | 17 ++++---------
 textproc/py-ntc-templates/distinfo                 |  6 ++---
 .../py-ntc-templates/files/patch-pyproject.toml    | 14 +++++++++++
 textproc/py-ntc-templates/files/patch-setup.py     | 29 ----------------------
 4 files changed, 22 insertions(+), 44 deletions(-)

diff --git a/textproc/py-ntc-templates/Makefile b/textproc/py-ntc-templates/Makefile
index 0bb975dd8520..4876c15772c5 100644
--- a/textproc/py-ntc-templates/Makefile
+++ b/textproc/py-ntc-templates/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	ntc-templates
 DISTVERSIONPREFIX=	v
-DISTVERSION=	3.1.0
+DISTVERSION=	3.2.0
 CATEGORIES=	textproc net-mgmt python
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
@@ -11,25 +11,18 @@ WWW=		https://github.com/networktocode/ntc-templates
 LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}poetry-core>=1.0.0:devel/py-poetry-core@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}textfsm>=1.1.0<2.0.0:textproc/py-textfsm@${PY_FLAVOR}
-TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}ruamel.yaml>0:devel/py-ruamel.yaml@${PY_FLAVOR} \
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}ruamel.yaml>0:devel/py-ruamel.yaml@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR}
 
-USES=		python:3.6+
+USES=		python:3.7+
 USE_GITHUB=	yes
 GH_ACCOUNT=	networktocode
-USE_PYTHON=	autoplist distutils
+USE_PYTHON=	autoplist pep517 pytest
 
 TEST_ENV=	PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
 
 NO_ARCH=	yes
 
-post-patch:
-	@${REINPLACE_CMD} -e 's|%%DISTVERSION%%|${DISTVERSION}|' \
-		${WRKSRC}/setup.py
-
-do-test:
-	@cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v -rs
-
 .include <bsd.port.mk>
diff --git a/textproc/py-ntc-templates/distinfo b/textproc/py-ntc-templates/distinfo
index 13455d188288..f697d762cf0b 100644
--- a/textproc/py-ntc-templates/distinfo
+++ b/textproc/py-ntc-templates/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1662218002
-SHA256 (networktocode-ntc-templates-v3.1.0_GH0.tar.gz) = e6aafd7dda5a74ccd85ce49868d9a9902e6553fd4944d01b24ecaf76d81a453e
-SIZE (networktocode-ntc-templates-v3.1.0_GH0.tar.gz) = 802415
+TIMESTAMP = 1677151350
+SHA256 (networktocode-ntc-templates-v3.2.0_GH0.tar.gz) = ae13e834501c16a919f777b29adafd7d44be93c448ad1df90c34aad4b06a1657
+SIZE (networktocode-ntc-templates-v3.2.0_GH0.tar.gz) = 1003673
diff --git a/textproc/py-ntc-templates/files/patch-pyproject.toml b/textproc/py-ntc-templates/files/patch-pyproject.toml
new file mode 100644
index 000000000000..7a58da8b4522
--- /dev/null
+++ b/textproc/py-ntc-templates/files/patch-pyproject.toml
@@ -0,0 +1,14 @@
+Avoid installing "LICENSE" and "README.md" on top of Python's "site-packages/"
+directory which would lead to conflicting packages.
+
+--- pyproject.toml.orig	2023-02-23 18:07:16 UTC
++++ pyproject.toml
+@@ -19,8 +19,6 @@ include = [
+     "Programming Language :: Python :: 3.10",
+ ]
+ include = [
+-    "LICENSE",
+-    "README.md",
+     "ntc_templates/templates/*.textfsm",
+     "ntc_templates/templates/index",
+ ]
diff --git a/textproc/py-ntc-templates/files/patch-setup.py b/textproc/py-ntc-templates/files/patch-setup.py
deleted file mode 100644
index 279ced16c65b..000000000000
--- a/textproc/py-ntc-templates/files/patch-setup.py
+++ /dev/null
@@ -1,29 +0,0 @@
---- setup.py.orig	2022-03-27 21:10:43 UTC
-+++ setup.py
-@@ -0,0 +1,26 @@
-+# -*- coding: utf-8 -*-
-+from setuptools import setup
-+
-+packages = \
-+['ntc_templates']
-+
-+package_data = \
-+{'': ['*'], 'ntc_templates': ['templates/*']}
-+
-+install_requires = \
-+['textfsm>=1.1.0,<2.0.0']
-+
-+setup_kwargs = {
-+    'name': 'ntc-templates',
-+    'version': '%%DISTVERSION%%',
-+    'description': "TextFSM Templates for Network Devices, and Python wrapper for TextFSM's CliTable.",
-+    'author': 'Network to Code',
-+    'author_email': 'info@networktocode.com',
-+    'url': 'https://github.com/networktocode/ntc-templates',
-+    'packages': packages,
-+    'package_data': package_data,
-+    'install_requires': install_requires,
-+    'python_requires': '>=3.6,<4.0',
-+}
-+
-+setup(**setup_kwargs)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302231848.31NImhfY048743>