git: d69de92defd8 - main - devel/py-shtab: Add py-shtab 1.5.8
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 30 Dec 2022 09:07:54 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=d69de92defd8933830dbe0498c3c49b59fa6ea65 commit d69de92defd8933830dbe0498c3c49b59fa6ea65 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2022-12-30 08:36:12 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2022-12-30 09:04:00 +0000 devel/py-shtab: Add py-shtab 1.5.8 What: Automatically generate shell tab completion scripts for Python CLI apps Why: Speed & correctness. Alternatives like argcomplete and pyzshcomplete are slow and have side-effects How: shtab processes an argparse.ArgumentParser object to generate a tab completion script for your shell Features: - Outputs tab completion scripts for - bash - zsh - tcsh - Supports - argparse - docopt (via argopt) - Supports arguments, options and subparsers - Supports choices (e.g. --say={hello,goodbye}) - Supports file and directory path completion - Supports custom path completion (e.g. --file={*.txt}) --- devel/Makefile | 1 + devel/py-shtab/Makefile | 20 ++++++++++++++++++++ devel/py-shtab/distinfo | 3 +++ devel/py-shtab/files/patch-setup.cfg | 11 +++++++++++ devel/py-shtab/pkg-descr | 18 ++++++++++++++++++ 5 files changed, 53 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index fff7f4bd782c..388eeff0cb15 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -5351,6 +5351,7 @@ SUBDIR += py-sh SUBDIR += py-shapely SUBDIR += py-shellingham + SUBDIR += py-shtab SUBDIR += py-signalr-client-aio SUBDIR += py-simpleeval SUBDIR += py-simplegeneric diff --git a/devel/py-shtab/Makefile b/devel/py-shtab/Makefile new file mode 100644 index 000000000000..ddaa6461934f --- /dev/null +++ b/devel/py-shtab/Makefile @@ -0,0 +1,20 @@ +PORTNAME= shtab +PORTVERSION= 1.5.8 +CATEGORIES= devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Automagic shell tab completion for Python CLI applications +WWW= https://github.com/iterative/shtab + +LICENSE= APACHE20 + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=3.4:devel/py-setuptools_scm@${PY_FLAVOR} + +USES= python:3.7+ +USE_PYTHON= autoplist concurrent distutils + +NO_ARCH= yes + +.include <bsd.port.mk> diff --git a/devel/py-shtab/distinfo b/devel/py-shtab/distinfo new file mode 100644 index 000000000000..8e00148fbb58 --- /dev/null +++ b/devel/py-shtab/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1669057511 +SHA256 (shtab-1.5.8.tar.gz) = 1f944e2e33c1554be69e6b26ef638ba3b516ac9449fdd2a40d197f9061c8bed8 +SIZE (shtab-1.5.8.tar.gz) = 45670 diff --git a/devel/py-shtab/files/patch-setup.cfg b/devel/py-shtab/files/patch-setup.cfg new file mode 100644 index 000000000000..b192883223bb --- /dev/null +++ b/devel/py-shtab/files/patch-setup.cfg @@ -0,0 +1,11 @@ +--- setup.cfg.orig 2022-11-18 22:13:24 UTC ++++ setup.cfg +@@ -67,7 +67,7 @@ classifiers = + Topic :: Utilities + + [options] +-setup_requires = setuptools>=42; wheel; setuptools_scm[toml]>=3.4 ++setup_requires = setuptools>=42; setuptools_scm[toml]>=3.4 + install_requires = + argparse; "3.0" <= python_version and python_version < "3.2" + python_requires = >=3.7 diff --git a/devel/py-shtab/pkg-descr b/devel/py-shtab/pkg-descr new file mode 100644 index 000000000000..2deb1de0f400 --- /dev/null +++ b/devel/py-shtab/pkg-descr @@ -0,0 +1,18 @@ +What: Automatically generate shell tab completion scripts for Python CLI apps +Why: Speed & correctness. Alternatives like argcomplete and pyzshcomplete are +slow and have side-effects +How: shtab processes an argparse.ArgumentParser object to generate a tab +completion script for your shell + +Features: +- Outputs tab completion scripts for + - bash + - zsh + - tcsh +- Supports + - argparse + - docopt (via argopt) +- Supports arguments, options and subparsers +- Supports choices (e.g. --say={hello,goodbye}) +- Supports file and directory path completion +- Supports custom path completion (e.g. --file={*.txt})