From 96389214fefcc0a0bc265ac69673830dd57e6e59 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 5 Jan 2010 14:25:21 -0800 Subject: wire up install --- src/fedpkg.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/fedpkg.py') diff --git a/src/fedpkg.py b/src/fedpkg.py index 6db018f..83127dc 100755 --- a/src/fedpkg.py +++ b/src/fedpkg.py @@ -76,8 +76,18 @@ def gimmespec(args): sys.exit(1) def install(args): - # not implimented - print('Not implimented yet, got %s' % args) + arch = None + short = False + if args.arch: + arch = args.arch + if args.short_circuit: + short = True + try: + mymodule = fedpkg.PackageModule(args.path) + print(mymodule.install(arch=arch, short=short)) + except fedpkg.FedpkgError, e: + print('Could not install: %s' % e) + sys.exit(1) def lint(args): try: @@ -264,6 +274,7 @@ if __name__ == '__main__': # install locally parser_install = subparsers.add_parser('install', help = 'Local test rpmbuild install') + parser_install.add_argument('--arch', help = 'Arch to install for') parser_install.add_argument('--short-circuit', action = 'store_true', help = 'short-circuit install') parser_install.set_defaults(command = install) -- cgit