From 8109028c1ecbfb32849d8537670269dd164c388c Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 16 Jun 2011 23:19:44 -0600 Subject: Put the client in bindir. --- dimension/Makefile.am | 2 +- dimension/dimension.in | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'dimension') diff --git a/dimension/Makefile.am b/dimension/Makefile.am index 6d1a7af..cd0603f 100644 --- a/dimension/Makefile.am +++ b/dimension/Makefile.am @@ -20,4 +20,4 @@ SUBDIRS = . \ tests -python_PYTHON = dimension +bin_SCRIPTS = dimension diff --git a/dimension/dimension.in b/dimension/dimension.in index 1b6c229..ad40873 100644 --- a/dimension/dimension.in +++ b/dimension/dimension.in @@ -41,8 +41,17 @@ def progress_bar(str, progress): progress.finish() +# Specialized parser to print --version output to stdout rather than stderr, +# to pass distcheck +class _DimensionArgumentParser(argparse.ArgumentParser): + def exit(self, status = 0, message = None): + if message: + file = sys.stdout if status == 0 else sys.stderr + file.write(message) + sys.exit(status) + # Parse the command line -_parser = argparse.ArgumentParser( +_parser = _DimensionArgumentParser( epilog = "@PACKAGE_STRING@\n" "@PACKAGE_URL@\n" "Copyright (C) 2009-2011 Tavian Barnes <@PACKAGE_BUGREPORT@>\n" @@ -64,8 +73,6 @@ _parser.add_argument("-v", "--verbose", action = "store_true", _parser.add_argument("-q", "--quiet", action = "store_true", help = "print less information") -_parser.add_argument("--strict", action = "store_true", - help = "treat warnings as errors") _parser.add_argument("--threads", action = "store", type = int, help = "the number of threads to render with") _parser.add_argument("--quality", action = "store", type = int, @@ -76,6 +83,10 @@ _parser.add_argument("-o", "--output", action = "store", type = str, _parser.add_argument("input", action = "store", type = str, help = "the input scene description file") +# Debugging/testing options +_parser.add_argument("--strict", action = "store_true", + help = argparse.SUPPRESS) + _args = _parser.parse_args() # Default output is basename(input).png -- cgit v1.2.3