diff options
author | Jesse Keating <jkeating@redhat.com> | 2010-01-05 14:21:32 -0800 |
---|---|---|
committer | Jesse Keating <jkeating@redhat.com> | 2010-01-05 14:21:32 -0800 |
commit | c905e7a9f89171d32b4238a90d6c1fb1247a760d (patch) | |
tree | 0f34592145181e8477766185effd76d6ad063a21 /src/fedpkg.py | |
parent | 7c1f76b3657a3cbb7b34da3b72d9f0e724081ecc (diff) | |
download | fedora-packager-c905e7a9f89171d32b4238a90d6c1fb1247a760d.tar.gz fedora-packager-c905e7a9f89171d32b4238a90d6c1fb1247a760d.tar.xz fedora-packager-c905e7a9f89171d32b4238a90d6c1fb1247a760d.zip |
wire up compile
Diffstat (limited to 'src/fedpkg.py')
-rwxr-xr-x | src/fedpkg.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/fedpkg.py b/src/fedpkg.py index 5248a36..6db018f 100755 --- a/src/fedpkg.py +++ b/src/fedpkg.py @@ -50,8 +50,18 @@ def clone(args): fedpkg.clone(args.module, args.user, args.branch) def compile(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.compile(arch=arch, short=short)) + except fedpkg.FedpkgError, e: + print('Could not compile: %s' % e) + sys.exit(1) def export(args): # not implimented @@ -236,6 +246,7 @@ if __name__ == '__main__': # compile locally parser_compile = subparsers.add_parser('compile', help = 'Local test rpmbuild compile') + parser_compile.add_argument('--arch', help = 'Arch to compile for') parser_compile.add_argument('--short-circuit', action = 'store_true', help = 'short-circuit compile') parser_compile.set_defaults(command = compile) |