Verified Commit 33f1fe55 authored by Adam Mercer's avatar Adam Mercer
Browse files

add initial option parsing code

parent 88381cfc
#!/usr/bin/env python
# Copyright(C) 2019 Adam Mercer <adam.mercer@ligo.org>
#
# This file is part of Koji-Packager.
#
# Koji-Packager is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# import required modules
#
import argparse
#
# metadata
#
__version__= "0.0.1"
#
# helper methods
#
def parse_options():
# define option parser
parser = argparse.ArgumentParser(description='Build RPMs using Koji')
parser.add_argument('--version', action='version', version=__version__)
parser.add_argument('source-rpm', nargs=1,
help='Source RPM to build with Koji')
# parse options
args = parser.parse_args()
return args
#
# main program
#
def main():
args = parse_options()
print(args)
#
# main program entry point
#
if __name__ == '__main__':
main()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment