git: b1320aa72b30 - main - net-mgmt/py-pynetbox: Add new port

From: Kai Knoblich <kai_at_FreeBSD.org>
Date: Thu, 21 Oct 2021 15:34:18 UTC
The branch main has been updated by kai:

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

commit b1320aa72b302dc02838cdcb62fe1e944f55e37d
Author:     Kai Knoblich <kai@FreeBSD.org>
AuthorDate: 2021-10-21 15:30:11 +0000
Commit:     Kai Knoblich <kai@FreeBSD.org>
CommitDate: 2021-10-21 15:32:12 +0000

    net-mgmt/py-pynetbox: Add new port
    
    This package offers direct access to the API of NetBox and allows to
    manipulate several objects within a NetBox instance.
    
    WWW: https://github.com/netbox-community/pynetbox
---
 net-mgmt/Makefile              |  1 +
 net-mgmt/py-pynetbox/Makefile  | 42 ++++++++++++++++++++++++++++++++++++++++++
 net-mgmt/py-pynetbox/distinfo  |  3 +++
 net-mgmt/py-pynetbox/pkg-descr |  4 ++++
 4 files changed, 50 insertions(+)

diff --git a/net-mgmt/Makefile b/net-mgmt/Makefile
index c2978028b5a4..ceb074d213b8 100644
--- a/net-mgmt/Makefile
+++ b/net-mgmt/Makefile
@@ -318,6 +318,7 @@
     SUBDIR += py-pyIOSXR
     SUBDIR += py-pyang
     SUBDIR += py-pyeapi
+    SUBDIR += py-pynetbox
     SUBDIR += py-pynxos
     SUBDIR += py-pysmi
     SUBDIR += py-pysnmp
diff --git a/net-mgmt/py-pynetbox/Makefile b/net-mgmt/py-pynetbox/Makefile
new file mode 100644
index 000000000000..67b8d78853de
--- /dev/null
+++ b/net-mgmt/py-pynetbox/Makefile
@@ -0,0 +1,42 @@
+PORTNAME=	pynetbox
+DISTVERSION=	6.1.3
+CATEGORIES=	net-mgmt python
+MASTER_SITES=	CHEESESHOP
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	kai@FreeBSD.org
+COMMENT=	NetBox API client library
+
+LICENSE=	APACHE20
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}setuptools_scm>0:devel/py-setuptools_scm@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}requests>=2.20<3:www/py-requests@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}six>=1.0<2:devel/py-six@${PY_FLAVOR}
+TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR}
+
+USES=		python:3.6+
+USE_PYTHON=	autoplist concurrent distutils
+
+TEST_ENV=	PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+
+NO_ARCH=	yes
+PORTDOCS=       *
+
+OPTIONS_DEFINE=	DOCS
+
+DOCS_BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sphinx>=0,1:textproc/py-sphinx@${PY_FLAVOR}
+DOCS_VARS=		PYDISTUTILS_BUILD_TARGET+="build_sphinx -a -E"
+
+post-install-DOCS-on:
+	@${MKDIR} ${STAGEDIR}${DOCSDIR}
+	(cd ${WRKSRC}/build/sphinx/html && \
+		${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} \
+			"! -name .buildinfo -and ! -name objects.inv")
+
+# Skip integration tests as they require Docker and a checked out git repository
+do-test:
+	@cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -v -rs -k 'not integration'
+
+.include <bsd.port.mk>
diff --git a/net-mgmt/py-pynetbox/distinfo b/net-mgmt/py-pynetbox/distinfo
new file mode 100644
index 000000000000..60c949709061
--- /dev/null
+++ b/net-mgmt/py-pynetbox/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1634760908
+SHA256 (pynetbox-6.1.3.tar.gz) = e579c5a74ff98dffd2cecb0451b2fffc1924731b56876d7d97b9aaa2b6ef7aa6
+SIZE (pynetbox-6.1.3.tar.gz) = 58425
diff --git a/net-mgmt/py-pynetbox/pkg-descr b/net-mgmt/py-pynetbox/pkg-descr
new file mode 100644
index 000000000000..7fd55e5b4009
--- /dev/null
+++ b/net-mgmt/py-pynetbox/pkg-descr
@@ -0,0 +1,4 @@
+This package offers direct access to the API of NetBox and allows to manipulate
+several objects within a NetBox instance.
+
+WWW: https://github.com/netbox-community/pynetbox