svn commit: r476822 - in head/devel: . py-knack
David Naylor
dbn at FreeBSD.org
Fri Aug 10 09:43:10 UTC 2018
Author: dbn
Date: Fri Aug 10 09:43:08 2018
New Revision: 476822
URL: https://svnweb.freebsd.org/changeset/ports/476822
Log:
devel/py-knack: add port
Knack is a Python command line parsing framework.
Added:
head/devel/py-knack/
head/devel/py-knack/Makefile (contents, props changed)
head/devel/py-knack/distinfo (contents, props changed)
head/devel/py-knack/pkg-descr (contents, props changed)
Modified:
head/devel/Makefile
Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile Fri Aug 10 09:38:00 2018 (r476821)
+++ head/devel/Makefile Fri Aug 10 09:43:08 2018 (r476822)
@@ -4682,6 +4682,7 @@
SUBDIR += py-kid
SUBDIR += py-kitchen
SUBDIR += py-kjbuckets
+ SUBDIR += py-knack
SUBDIR += py-kqueue
SUBDIR += py-krosspython-kde4
SUBDIR += py-lazr.config
Added: head/devel/py-knack/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/py-knack/Makefile Fri Aug 10 09:43:08 2018 (r476822)
@@ -0,0 +1,26 @@
+# $FreeBSD$
+
+PORTNAME= knack
+DISTVERSION= 0.4.2
+CATEGORIES= devel python
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= dbn at FreeBSD.org
+COMMENT= Command line interface framework
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}argcomplete>0:devel/py-argcomplete@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}colorama>0:devel/py-colorama@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}jmespath>0:devel/py-jmespath@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pygments>0:textproc/py-pygments@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}tabulate>0:devel/py-tabulate@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist distutils concurrent
+USE_GITHUB= yes
+GH_ACCOUNT= Microsoft
+
+.include <bsd.port.mk>
Added: head/devel/py-knack/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/py-knack/distinfo Fri Aug 10 09:43:08 2018 (r476822)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1533670070
+SHA256 (Microsoft-knack-0.4.2_GH0.tar.gz) = 063ad23fd7531658daefe678f4b2d7a98a966fc7704f54a001138f9e62ea0211
+SIZE (Microsoft-knack-0.4.2_GH0.tar.gz) = 66740
Added: head/devel/py-knack/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/py-knack/pkg-descr Fri Aug 10 09:43:08 2018 (r476822)
@@ -0,0 +1,24 @@
+Knack is a Python command line parsing framework. Knack is built around the
+following patterns:
+ - Be consistent with POSIX tools.
+ - CLI success comes from ease and predictability of use so be consistent.
+ - Support Piping and output direction to chain commands together.
+ - Work with GREP, AWK, JQ and other common tools and commands.
+ - Support productivity features like tab completion and parameter value
+ completion.
+ - Commands should follow a "[noun] [noun] [verb]" pattern.
+ - For nouns that only support a single verb, the command should be named as a
+ single hyphenated verb-noun pair.
+ - Commands should support all output types (be consistent).
+ - Exceptions are okay if only a 'raw' format makes sense e.g. XML.
+ - Commands and arguments should have descriptions.
+ - Include examples for the less straightforward commands.
+ - Commands should return an object or dictionary, not strings/bools/etc.;
+ logging.info("Upload of myfile.txt successful") NOT return
+ "Upload successful".
+ - Log to ERROR or WARNING for user messages; don't use print() function (by
+ default it goes to STDOUT).
+ - STDOUT vs. STDERR: STDOUT is used for actual command output. Everything
+ else to STDERR (e.g. log/status/error messages).
+
+WWW: https://github.com/Microsoft/knack
More information about the svn-ports-all
mailing list