summaryrefslogtreecommitdiffstats
path: root/src/fedpkg.py
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2011-01-21 11:05:31 +0100
committerHans Ulrich Niedermann <hun@n-dimensional.de>2011-02-05 01:17:58 +0100
commitc554d2c5284eb3dd6dc37b5b709a7d59d37c86c8 (patch)
treed18edbf8e772724730fd545413d939aa9aeef6c2 /src/fedpkg.py
parent3324262aa9f763f4716e602658f4ff59588cdf8a (diff)
downloadfedora-packager-5/man-page.zip
fedora-packager-5/man-page.tar.gz
fedora-packager-5/man-page.tar.xz
Add build time man page generator5/man-page
Add man page generator to generate a man page at build time.
Diffstat (limited to 'src/fedpkg.py')
-rwxr-xr-xsrc/fedpkg.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/fedpkg.py b/src/fedpkg.py
index 4e7344b..e3e98a5 100755
--- a/src/fedpkg.py
+++ b/src/fedpkg.py
@@ -1230,8 +1230,19 @@ packages will be built sequentially.
' name-version-release')
parser_verrel.set_defaults(command = verrel)
- # Parse the args
- return parser.parse_args()
+ if not generate_manpage:
+ # Parse the args
+ return parser.parse_args()
+ else:
+ # Generate the man page
+
+ # Use the "as man_page" part to avoid overwriting the pyfedpkg
+ # namespace, which would break all usage of pyfedpkg.* outside
+ # of this else branch.
+ import pyfedpkg.man_page as man_page
+ man_page.generate(parser, subparsers)
+ sys.exit(0)
+ # no return possible
# The main code goes here