[Python-modules-commits] [fake-factory] 16/17: Use help2man directly to generate a manpage

Christopher Baines cbaines-guest at moszumanska.debian.org
Sat Mar 19 17:22:07 UTC 2016


This is an automated email from the git hooks/post-receive script.

cbaines-guest pushed a commit to branch master
in repository fake-factory.

commit e92248dd7cb63950832cd1b150a55c8f301f5972
Author: Christopher Baines <mail at cbaines.net>
Date:   Sat Mar 19 16:51:36 2016 +0000

    Use help2man directly to generate a manpage
---
 debian/control |  1 +
 debian/faker.1 | 45 ---------------------------------------------
 debian/rules   |  5 +++++
 3 files changed, 6 insertions(+), 45 deletions(-)

diff --git a/debian/control b/debian/control
index 976f4ed..644081e 100644
--- a/debian/control
+++ b/debian/control
@@ -9,6 +9,7 @@ Build-Depends: dh-python,
                python-all,
                python3-all,
                debhelper (>= 9),
+               help2man,
                python-mock,
                python3-mock,
                python-dateutil,
diff --git a/debian/faker.1 b/debian/faker.1
deleted file mode 100644
index 5154867..0000000
--- a/debian/faker.1
+++ /dev/null
@@ -1,45 +0,0 @@
-.TH FAKER "1" "February 2016" "faker 0.5.3" "User Commands"
-.SH NAME
-faker \- Python library for generating fake data
-.SH DESCRIPTION
-usage: faker [\-h] [\-\-version] [\-o output]
-[\-l {dk_DK,ru_RU,...,sv_SE,pl_PL}]
-[\-r REPEAT] [\-s SEP] [\-i [INCLUDE [INCLUDE ...]]]
-[fake [fake argument ...]]
-.PP
-Faker is a python library that generates fake data.  That fake data can be used
-to bootstrap a database, create XML documents, or anonymize data taken from a
-production service.
-.SS "positional arguments:"
-.TP
-fake
-name of the fake to generate output for (e.g. profile)
-.TP
-fake argument
-optional arguments to pass to the fake (e.g. the
-profile fake takes an optional list of comma separated
-field names as the first argument)
-.SS "optional arguments:"
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-show this help message and exit
-.TP
-\fB\-\-version\fR
-show program's version number and exit
-.TP
-\fB\-o\fR output
-redirect output to a file
-.TP
-\fB\-l\fR {fa_IR,fi_FI,...,pt_PT,nl_NL}
-specify the language for a localized provider (e.g. de_DE)
-.TP
-\fB\-r\fR REPEAT, \fB\-\-repeat\fR REPEAT
-generate the specified number of outputs
-.TP
-\fB\-s\fR SEP, \fB\-\-sep\fR SEP
-use the specified separator after each output
-.TP
-\fB\-i\fR [INCLUDE [INCLUDE ...]], \fB\-\-include\fR [INCLUDE [INCLUDE ...]]
-list of additional custom providers to user, given as
-the import path of the module containing your Provider
-class (not the provider class itself)
diff --git a/debian/rules b/debian/rules
index ed60a6c..3a45c42 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,6 +9,11 @@ export PYBUILD_NAME=fake-factory
 %:
 	dh $@ --with python2 --with=python3 --buildsystem=pybuild
 
+override_dh_installman:
+	PYTHONPATH="." help2man -n "command to generate fake data" --no-info \
+		--output=debian/faker.1 debian/faker/usr/bin/faker
+	dh_installman
+
 override_dh_auto_install:
 	dh_auto_install
 	# Remove the faker script from the python 2 package

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/fake-factory.git



More information about the Python-modules-commits mailing list