From nobody Mon Mar 28 10:56:20 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id ABB231A3490F; Mon, 28 Mar 2022 10:56:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KRqPd2jRfz3nDm; Mon, 28 Mar 2022 10:56:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648464981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1rW3S1ywzIP24P9ax8EhZScPvFs9fORFToTVis8upeo=; b=oUHCxDbEZis5dCCahrQ5ZXNbRCEZIQei2R5rN0jkIm5eVO06pbLZi6ZrMkyiRt7ffPocmB NCFEU2XiF4gE64paJL7252+pCX4se57YB0BC8a52GrMXnSJF4hdzockkbBqgAPysrkVwip alZT3ngnvMnYbdym942KYxwhYBRTe4RmtLDYvMetYbkoLNwzEesfRw/dy6HNSh9nTCkSGP E8R6NVRMwJsnVGAiRFExparLMf6shYlf5/h1GuMOcwPQ75g1yVDfT2WRK1LX+ZCBPc0ba7 omS6oyPxBDcqfuM9pxoeCNpZV/jLoqG8T4FYl64UcvYgXuMcUkknqGiGpOnJiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0365E5AB; Mon, 28 Mar 2022 10:56:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22SAuK1e022704; Mon, 28 Mar 2022 10:56:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22SAuKS8022703; Mon, 28 Mar 2022 10:56:20 GMT (envelope-from git) Date: Mon, 28 Mar 2022 10:56:20 GMT Message-Id: <202203281056.22SAuKS8022703@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Kai Knoblich Subject: git: 35f92ba20eb4 - main - textproc/py-ntc-templates: New port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kai X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 35f92ba20eb40d243f5241217e22a213427bbd57 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1648464981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1rW3S1ywzIP24P9ax8EhZScPvFs9fORFToTVis8upeo=; b=v0Uw1/706pkBrTMQjKQRmjs2+4A2e31iBQ2SV5Cy1ZoEE2tVfT4JjiU9L4fV9fKP3LeOTs XaO9uYKweUjL+c9x/R1S7JF5kOs+UM/+EwjuA9YaQc77r4nnZMb76fUyDvvkoICxPrvJSd 2fvrGrxaDr516CfmvfCjU+N/cBm9y28GUciqnlddICND77QCZLq3ymJAuXRNb92XjDodaE OZTDPbWT7hjQ8xundQWPZKqBhXjSFgxWEhfuP51TFkBIB/7ZpV6g02/NmIzxz5Y5CNuIBr /b2QPXhOd1FmZH54dZD6pgP4rsAV5rAGmyuJD0ptqLKvl3yEy5ao6FLRJS24qQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1648464981; a=rsa-sha256; cv=none; b=oTtFQO8S+JIS1Zk/zdLQ+EmmypKQOTA1/31vtemM/OhJhZM8drmeNdKcoPkeJ5Zej4Zccs Lm9Lazt2MJuOqij7ngoj4lMF9ECV1302Kql21Zcr3UC0lyb2MUdRoBJYJU4RKQEfR5kIj5 LwdBAtfX/d9MURaGuMIXDxenu5PVe9NaZ0x+dCI1l08mloziOIWH4kJpoPBRkaasfU4WIA vMhgDYUNh0a34fPsna7OS7puvO3VYVd7PrfwHUKtxBIF9I4XShkNv3WgQvKd/Iojl46Zt/ TMk1T3kTS5gN3VnEayE/+xQ7MRFHvUJsTHd+WrWBvX+hXDC8J6WyEJYMFoMq3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kai: URL: https://cgit.FreeBSD.org/ports/commit/?id=35f92ba20eb40d243f5241217e22a213427bbd57 commit 35f92ba20eb40d243f5241217e22a213427bbd57 Author: Kai Knoblich AuthorDate: 2022-03-28 10:42:00 +0000 Commit: Kai Knoblich CommitDate: 2022-03-28 10:42:00 +0000 textproc/py-ntc-templates: New port The NTC templates project provides a large collection of TextFSM Templates (text parsers) for a variety of Networking Vendors. In addition to the templates, there is a function that will convert the CLI output into a CliTable object; the resulting text table is converted into a list of dictionaries mapping the column headers with each row in the table. WWW: https://github.com/networktocode/ntc-templates --- textproc/Makefile | 1 + textproc/py-ntc-templates/Makefile | 30 ++++++++++++++++++++++++++ textproc/py-ntc-templates/distinfo | 3 +++ textproc/py-ntc-templates/files/patch-setup.py | 29 +++++++++++++++++++++++++ textproc/py-ntc-templates/pkg-descr | 8 +++++++ 5 files changed, 71 insertions(+) diff --git a/textproc/Makefile b/textproc/Makefile index cbaf8601fdf5..24db1cd44931 100644 --- a/textproc/Makefile +++ b/textproc/Makefile @@ -1377,6 +1377,7 @@ SUBDIR += py-nbsphinx SUBDIR += py-nltk SUBDIR += py-normality + SUBDIR += py-ntc-templates SUBDIR += py-numpydoc SUBDIR += py-ocrmypdf SUBDIR += py-openpyxl diff --git a/textproc/py-ntc-templates/Makefile b/textproc/py-ntc-templates/Makefile new file mode 100644 index 000000000000..40e60e413c59 --- /dev/null +++ b/textproc/py-ntc-templates/Makefile @@ -0,0 +1,30 @@ +PORTNAME= ntc-templates +DISTVERSIONPREFIX= v +DISTVERSION= 3.0.0 +CATEGORIES= textproc net-mgmt python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= kai@FreeBSD.org +COMMENT= TextFSM Templates for Network Devices + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +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} \ + ${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR} + +USES= python:3.6+ +USE_GITHUB= yes +GH_ACCOUNT= networktocode +USE_PYTHON= autoplist distutils + +TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + +NO_ARCH= yes + +do-test: + @cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v -rs + +.include diff --git a/textproc/py-ntc-templates/distinfo b/textproc/py-ntc-templates/distinfo new file mode 100644 index 000000000000..32e85ebb0cc4 --- /dev/null +++ b/textproc/py-ntc-templates/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1648157996 +SHA256 (networktocode-ntc-templates-v3.0.0_GH0.tar.gz) = d5f1148926b1b7a5929ac4896dfa6712bef840d2fb33710fbe6fe505c9f34a6f +SIZE (networktocode-ntc-templates-v3.0.0_GH0.tar.gz) = 752785 diff --git a/textproc/py-ntc-templates/files/patch-setup.py b/textproc/py-ntc-templates/files/patch-setup.py new file mode 100644 index 000000000000..9412c6341606 --- /dev/null +++ b/textproc/py-ntc-templates/files/patch-setup.py @@ -0,0 +1,29 @@ +--- 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': '3.0.0', ++ '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) diff --git a/textproc/py-ntc-templates/pkg-descr b/textproc/py-ntc-templates/pkg-descr new file mode 100644 index 000000000000..363142fa427c --- /dev/null +++ b/textproc/py-ntc-templates/pkg-descr @@ -0,0 +1,8 @@ +The NTC templates project provides a large collection of TextFSM Templates +(text parsers) for a variety of Networking Vendors. + +In addition to the templates, there is a function that will convert the CLI +output into a CliTable object; the resulting text table is converted into a +list of dictionaries mapping the column headers with each row in the table. + +WWW: https://github.com/networktocode/ntc-templates