Manually adding --version to argparse in python stub since python 3.3 dropped the version keyword.

This commit is contained in:
Daniel Baumann 2013-11-04 07:16:28 +01:00
parent 52122b2845
commit a5bd371568
6 changed files with 12 additions and 12 deletions

View File

@ -30,11 +30,11 @@ def main():
description = '''live-build contains the components to build a live system from a configuration directory.
The binary_hooks command executes hooks after the binary stage.''',
epilog = 'See \'man lb_binary_hooks\' for more information.',
version = 'live-build 4',
formatter_class = argparse.ArgumentDefaultsHelpFormatter
)
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
arguments.add_argument('--version', help='show program\'s version number and exit', action='version', version='live-build 4')
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
args = arguments.parse_args()

View File

@ -32,11 +32,11 @@ def main():
description = '''live-build contains the components to build a live system from a configuration directory.
The bootstrap_cdebootstrap command bootstraps the chroot system with cdebootstrap.''',
epilog = 'See \'man lb_bootstrap_cdebootstrap\' for more information.',
version = 'live-build 4',
formatter_class = argparse.ArgumentDefaultsHelpFormatter
)
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
arguments.add_argument('--version', help='show program\'s version number and exit', action='version', version='live-build 4')
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
arguments.add_argument('--cdebootstrap-options', help='set cdebootstrap(1) options' )
args = arguments.parse_args()

View File

@ -32,11 +32,11 @@ def main():
description = '''live-build contains the components to build a live system from a configuration directory.
The bootstrap_debootstrap command bootstraps the chroot system with debootstrap.''',
epilog = 'See \'man lb_bootstrap_debootstrap\' for more information.',
version = 'live-build 4',
formatter_class = argparse.ArgumentDefaultsHelpFormatter
)
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
arguments.add_argument('--version', help='show program\'s version number and exit', action='version', version='live-build 4')
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
arguments.add_argument('--debootstrap-options', help='set debootstrap(8) options' )
args = arguments.parse_args()

View File

@ -30,11 +30,11 @@ def main():
description = '''live-build contains the components to build a live system from a configuration directory.
The bootstrap_hooks command executes hooks after the bootstrap stage.''',
epilog = 'See \'man lb_bootstrap_hooks\' for more information.',
version = 'live-build 4',
formatter_class = argparse.ArgumentDefaultsHelpFormatter
)
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
arguments.add_argument('--version', help='show program\'s version number and exit', action='version', version='live-build 4')
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
args = arguments.parse_args()

View File

@ -30,11 +30,11 @@ def main():
description = '''live-build contains the components to build a live system from a configuration directory.
The chroot_hooks command executes hooks after the chroot stage.''',
epilog = 'See \'man lb_chroot_hooks\' for more information.',
version = 'live-build 4',
formatter_class = argparse.ArgumentDefaultsHelpFormatter
)
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
arguments.add_argument('--version', help='show program\'s version number and exit', action='version', version='live-build 4')
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
args = arguments.parse_args()

View File

@ -30,11 +30,11 @@ def main():
description = '''live-build contains the components to build a live system from a configuration directory.
The source_hooks command executes hooks after the source stage.''',
epilog = 'See \'man lb_source_hooks\' for more information.',
version = 'live-build 4',
formatter_class = argparse.ArgumentDefaultsHelpFormatter
)
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
arguments.add_argument('--version', help='show program\'s version number and exit', action='version', version='live-build 4')
arguments.add_argument('--verbose', help='set verbose option', action='store_true')
args = arguments.parse_args()