summaryrefslogtreecommitdiffstats
path: root/dimension/dimension.in
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-06-16 23:19:44 -0600
committerTavian Barnes <tavianator@gmail.com>2011-06-16 23:19:44 -0600
commit8109028c1ecbfb32849d8537670269dd164c388c (patch)
treec2b741541873c2ff759ec307abd827e05cd06328 /dimension/dimension.in
parent415c34935c58c05b5ca0e99a10198f871a90edf4 (diff)
downloaddimension-8109028c1ecbfb32849d8537670269dd164c388c.tar.xz
Put the client in bindir.
Diffstat (limited to 'dimension/dimension.in')
-rw-r--r--dimension/dimension.in17
1 files changed, 14 insertions, 3 deletions
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