From 395e4e37ee145cb6d3e7419383b314cc6102156a Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Fri, 28 Aug 2015 14:14:33 -0700 Subject: Use module docstring for argparse help. Change-Id: Idc72987bd5652f0b2d666eedeb5ec51750da6929 --- build.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.py b/build.py index 34cc19f5b..ddafc2166 100755 --- a/build.py +++ b/build.py @@ -14,9 +14,11 @@ # See the License for the specific language governing permissions and # limitations under the License. # +"""Builds GCC for Android.""" from __future__ import print_function import argparse +import inspect import multiprocessing import os import subprocess @@ -51,7 +53,8 @@ ALL_TOOLCHAINS = ( class ArgParser(argparse.ArgumentParser): def __init__(self): super(ArgParser, self).__init__( - description='Builds GCC for Android.') + description=inspect.getdoc(sys.modules[__name__]), + formatter_class=argparse.RawDescriptionHelpFormatter) self.add_argument( '--host', choices=('darwin', 'linux', 'windows', 'windows64'), -- cgit v1.2.3