aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2024-09-05 05:14:04 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2024-09-05 06:11:19 +0000
commiteba20a57733da6482627fe49cf86a131fb58b546 (patch)
treee80b44fca4b303110f9430edf7a288b8140c48a3
parent8ac630951f58a12107ed49564a7bd91a1df2db1b (diff)
devel/py-argparse-manpage: Add py-argparse-manpage 4.6
Avoid documenting your Python script arguments on two places! This is typically done in an argparse.ArgumentParser help configuration (help=, description=, etc.), and also in a manually crafted manual page. The good thing about an ArgumentParser objects is that it actually provides a traversable "tree-like" structure, with all the necessary info needed to automatically generate documentation, for example in a groff typesetting system (manual pages). And this is where this project can help. There are two supported ways to generate the manual, either script it using the installed command argparse-manpage, or via setup.py build automation (with a slight bonus of automatic manual page installation with setup.py install).
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-argparse-manpage/Makefile25
-rw-r--r--devel/py-argparse-manpage/distinfo3
-rw-r--r--devel/py-argparse-manpage/pkg-descr12
4 files changed, 41 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index b5d9131c76b5..60915f1857a4 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4370,6 +4370,7 @@
SUBDIR += py-argcomplete
SUBDIR += py-argh
SUBDIR += py-argparse
+ SUBDIR += py-argparse-manpage
SUBDIR += py-argparse_addons
SUBDIR += py-args
SUBDIR += py-ariadne
diff --git a/devel/py-argparse-manpage/Makefile b/devel/py-argparse-manpage/Makefile
new file mode 100644
index 000000000000..c2b12814ecd6
--- /dev/null
+++ b/devel/py-argparse-manpage/Makefile
@@ -0,0 +1,25 @@
+PORTNAME= argparse-manpage
+PORTVERSION= 4.6
+CATEGORIES= devel python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Build manual page from python's ArgumentParser object
+WWW= https://github.com/praiskup/argparse-manpage
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}packaging>=0:devel/py-packaging@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
+ ${PY_TOMLI} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS= ${PY_TOMLI}
+
+USES= python
+USE_PYTHON= autoplist concurrent pep517
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/devel/py-argparse-manpage/distinfo b/devel/py-argparse-manpage/distinfo
new file mode 100644
index 000000000000..c091a5db3a15
--- /dev/null
+++ b/devel/py-argparse-manpage/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1724084480
+SHA256 (argparse-manpage-4.6.tar.gz) = 0b659d70fd142876da41c2918bd6de4d027875720b0e4672d6443b51198dbb62
+SIZE (argparse-manpage-4.6.tar.gz) = 58674
diff --git a/devel/py-argparse-manpage/pkg-descr b/devel/py-argparse-manpage/pkg-descr
new file mode 100644
index 000000000000..4134dfc1e24c
--- /dev/null
+++ b/devel/py-argparse-manpage/pkg-descr
@@ -0,0 +1,12 @@
+Avoid documenting your Python script arguments on two places! This is typically
+done in an argparse.ArgumentParser help configuration (help=, description=,
+etc.), and also in a manually crafted manual page.
+
+The good thing about an ArgumentParser objects is that it actually provides a
+traversable "tree-like" structure, with all the necessary info needed to
+automatically generate documentation, for example in a groff typesetting system
+(manual pages). And this is where this project can help.
+
+There are two supported ways to generate the manual, either script it using the
+installed command argparse-manpage, or via setup.py build automation (with a
+slight bonus of automatic manual page installation with setup.py install).