thomas@78: # Copyright (C) 2007 by Intevation GmbH thomas@78: # Authors: thomas@78: # Bernhard Herzog thomas@78: # thomas@78: # This program is free software under the GPL (>=v2) thomas@78: # Read the file COPYING coming with the software for details. thomas@78: thomas@78: """Common command line options""" thomas@78: thomas@78: import os thomas@78: from optparse import OptionParser thomas@78: thomas@78: thomas@78: def create_parser(): thomas@78: """Creates an OptionParser with common tree packager options""" thomas@78: parser = OptionParser() thomas@78: dirname = os.path.dirname(__file__) thomas@78: parser.set_defaults(config_file=os.path.join(dirname, os.pardir, thomas@78: "treepkg.cfg")) bricks@566: parser.add_option("--config-file", "--config", dest="config_file", thomas@78: help=("The tree packager config file." thomas@78: " Default treepkg.cfg")) thomas@78: return parser