svn commit: r401894 - in head/net-mgmt: . py-pysmi py-pysmi/files
Ruslan Makhmatkhanov
rm at FreeBSD.org
Wed Nov 18 20:28:04 UTC 2015
Author: rm
Date: Wed Nov 18 20:28:03 2015
New Revision: 401894
URL: https://svnweb.freebsd.org/changeset/ports/401894
Log:
Add py-pysmi 0.0.6, SNMP/SMI MIB parsing in Python.
PR: 204572
Submitted by: John W. O'Brien <john at saltant.com>
Added:
head/net-mgmt/py-pysmi/
head/net-mgmt/py-pysmi/Makefile (contents, props changed)
head/net-mgmt/py-pysmi/distinfo (contents, props changed)
head/net-mgmt/py-pysmi/files/
head/net-mgmt/py-pysmi/files/patch-setup.py (contents, props changed)
head/net-mgmt/py-pysmi/files/tests__init__.py (contents, props changed)
head/net-mgmt/py-pysmi/pkg-descr (contents, props changed)
Modified:
head/net-mgmt/Makefile
Modified: head/net-mgmt/Makefile
==============================================================================
--- head/net-mgmt/Makefile Wed Nov 18 20:07:25 2015 (r401893)
+++ head/net-mgmt/Makefile Wed Nov 18 20:28:03 2015 (r401894)
@@ -267,6 +267,7 @@
SUBDIR += py-ipcalc
SUBDIR += py-ipy
SUBDIR += py-pyang
+ SUBDIR += py-pysmi
SUBDIR += py-snmp4
SUBDIR += py-snmp4-apps
SUBDIR += py-snmp4-mibs
Added: head/net-mgmt/py-pysmi/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-mgmt/py-pysmi/Makefile Wed Nov 18 20:28:03 2015 (r401894)
@@ -0,0 +1,41 @@
+# Created by: John W. O'Brien <john at saltant.com>
+# $FreeBSD$
+
+PORTNAME= pysmi
+PORTVERSION= 0.0.6
+CATEGORIES= net-mgmt python
+MASTER_SITES= CHEESESHOP \
+ SF/pysmi/pysmi/${PORTVERSION}
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= john at saltant.com
+COMMENT= SNMP/SMI MIB parsing in Python
+
+LICENSE= BSD2CLAUSE
+
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}ply>=0:${PORTSDIR}/devel/py-ply
+
+NO_ARCH= yes
+USES= python shebangfix
+USE_PYTHON= autoplist concurrent distutils
+SHEBANG_FILES= scripts/mibdump.py
+
+OPTIONS_DEFINE= DOCS EXAMPLES
+
+PORTDOCS= *
+PORTEXAMPLES= *
+
+BASEDOCS= CHANGES.txt README.txt TODO.txt
+
+post-patch:
+ ${CP} ${FILESDIR}/tests__init__.py ${WRKSRC}/tests/__init__.py
+ ${MV} ${WRKSRC}/tests ${WRKSRC}/${PORTNAME}
+
+post-install:
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${BASEDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
+
+ @${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
+ (cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR})
+
+.include <bsd.port.mk>
Added: head/net-mgmt/py-pysmi/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-mgmt/py-pysmi/distinfo Wed Nov 18 20:28:03 2015 (r401894)
@@ -0,0 +1,2 @@
+SHA256 (pysmi-0.0.6.tar.gz) = f04641fd88239ad6708aad9f8b24bc1606b225346bb6a7bb7253cc2103a7d9a0
+SIZE (pysmi-0.0.6.tar.gz) = 55917
Added: head/net-mgmt/py-pysmi/files/patch-setup.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-mgmt/py-pysmi/files/patch-setup.py Wed Nov 18 20:28:03 2015 (r401894)
@@ -0,0 +1,12 @@
+--- setup.py.orig 2015-11-07 19:23:39 UTC
++++ setup.py
+@@ -80,7 +80,8 @@ params.update( {
+ 'pysmi.parser',
+ 'pysmi.codegen',
+ 'pysmi.borrower',
+- 'pysmi.writer' ],
++ 'pysmi.writer',
++ 'pysmi.tests' ],
+ 'scripts': [ os.path.join('scripts','mibdump.py') ]
+ } )
+
Added: head/net-mgmt/py-pysmi/files/tests__init__.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-mgmt/py-pysmi/files/tests__init__.py Wed Nov 18 20:28:03 2015 (r401894)
@@ -0,0 +1,20 @@
+from unittest import SkipTest, TestSuite
+
+
+def load_tests(loader, tests, pattern):
+ import suite
+ return suite.suite
+
+
+try:
+ from pysnmp.smi.builder import MibBuilder
+except ImportError:
+
+ # python -m unittest pysmi.tests
+ def load_tests(*args, **kwars):
+ print("Skipping test suite: pysnmp is not installed")
+ return TestSuite()
+
+ # nosetests pysmi
+ def setup():
+ raise SkipTest("pysnmp is not installed")
Added: head/net-mgmt/py-pysmi/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net-mgmt/py-pysmi/pkg-descr Wed Nov 18 20:28:03 2015 (r401894)
@@ -0,0 +1,3 @@
+Pure-Python implementation of SNMP/SMI MIB parsing and conversion library
+
+WWW: http://pysmi.sourceforge.net/
More information about the svn-ports-all
mailing list