summaryrefslogtreecommitdiff
path: root/net-mgmt/py-pynetbox
diff options
context:
space:
mode:
authorKai Knoblich <kai@FreeBSD.org>2021-10-21 17:30:11 +0200
committerKai Knoblich <kai@FreeBSD.org>2021-10-21 17:32:12 +0200
commitb1320aa72b302dc02838cdcb62fe1e944f55e37d (patch)
tree855edecdce6f1091eb7aed40894e3de763ae5914 /net-mgmt/py-pynetbox
parentnet-mgmt/netbox: Update to 3.0.8 (diff)
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
Diffstat (limited to 'net-mgmt/py-pynetbox')
-rw-r--r--net-mgmt/py-pynetbox/Makefile42
-rw-r--r--net-mgmt/py-pynetbox/distinfo3
-rw-r--r--net-mgmt/py-pynetbox/pkg-descr4
3 files changed, 49 insertions, 0 deletions
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