[med-svn] [sphinxcontrib-autoprogram] 02/04: Added a patch and suppressed a Lintian warning
Timothy Booth
tbooth-guest at moszumanska.debian.org
Sat Jan 31 21:40:19 UTC 2015
This is an automated email from the git hooks/post-receive script.
tbooth-guest pushed a commit to branch master
in repository sphinxcontrib-autoprogram.
commit 337720d1220f822eda1d01dbebc53d482d0d51ac
Author: Tim Booth <tbooth at ceh.ac.uk>
Date: Sat Jan 31 17:24:55 2015 +0000
Added a patch and suppressed a Lintian warning
---
debian/copyright | 2 +
debian/patches/include_the_epilog | 83 +++++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 86 insertions(+)
diff --git a/debian/copyright b/debian/copyright
index a6e1620..967c821 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -5,6 +5,8 @@ Source: https://bitbucket.org/birkenfeld/sphinx-contrib/autoprogram
Files: sphinxcontrib/*
Copyright: 2014 by Hong Minhee <@hongminhee.org>
License: BSD
+ The full text of the BSD license can be found under
+ /usr/share/common-licenses//BSD
Files: debian/*
Copyright: 2014 Tim Booth <tbooth at ceh.ac.uk>
diff --git a/debian/patches/include_the_epilog b/debian/patches/include_the_epilog
new file mode 100644
index 0000000..9583119
--- /dev/null
+++ b/debian/patches/include_the_epilog
@@ -0,0 +1,83 @@
+Description: https://bitbucket.org/birkenfeld/sphinx-contrib/pull-request/59/enhance-autoprogram-include-usage-summary/commits
+
+# HG changeset patch
+# User Michael R. Crusoe <mcrusoe at msu.edu>
+# Date 1396309865 14400
+# Node ID 4f83b4da94182a4145b2e1814766be610c19953c
+# Parent 28cbb91d0783dbb578edd51fcac89ee402c75f28
+autoprogram: set the prog name on the parser object
+
+Now that we use parser.format_usage()
+
+# HG changeset patch
+# User Michael R. Crusoe <mcrusoe at msu.edu>
+# Date 1396275605 14400
+# Node ID 28cbb91d0783dbb578edd51fcac89ee402c75f28
+# Parent 648ec7f6e344d6f8fac3dfdedb2db7bbcfefe75d
+autoprogram: include usage output
+
+# HG changeset patch
+# User Michael R. Crusoe <mcrusoe at msu.edu>
+# Date 1395853706 14400
+# Node ID 648ec7f6e344d6f8fac3dfdedb2db7bbcfefe75d
+# Parent d09ede7767254a9a00c4b3a79a67e97c35cbb178
+Print the arg type instead of the destination if there is no metavar
+Silence pylint warnings
+
+# HG changeset patch
+# User Michael R. Crusoe <mcrusoe at msu.edu>
+# Date 1395786893 14400
+# Node ID d09ede7767254a9a00c4b3a79a67e97c35cbb178
+# Parent 2904c5cc58c52db4569f802b46ed9358989ad2ab
+autoprogram: include the epilog
+
+--- a/sphinxcontrib/autoprogram.py
++++ b/sphinxcontrib/autoprogram.py
+@@ -8,6 +8,7 @@
+ :license: BSD, see LICENSE for details.
+
+ """
++# pylint: disable=protected-access,missing-docstring
+ import argparse
+ import collections
+ try:
+@@ -48,7 +49,7 @@
+ names = list(arg.option_strings)
+ desc = (arg.help or '') % {'default': arg.default}
+ options.append((names, desc))
+- yield command, options, parser.description or ''
++ yield command, options, parser.description, parser.epilog or ''
+ if parser._subparsers:
+ choices = parser._subparsers._actions[-1].choices.items()
+ if not (hasattr(collections, 'OrderedDict') and
+@@ -80,10 +81,10 @@
+ def make_rst(self):
+ import_name, = self.arguments
+ parser = import_object(import_name or '__undefined__')
+- prog = self.options.get('prog', parser.prog)
+- for commands, options, desc in scan_programs(parser):
++ parser.prog = self.options.get('prog', parser.prog)
++ for commands, options, desc, epilog in scan_programs(parser):
+ command = ' '.join(commands)
+- title = '{0} {1}'.format(prog, command).rstrip()
++ title = '{0} {1}'.format(parser.prog, command).rstrip()
+ yield ''
+ yield '.. program:: ' + title
+ yield ''
+@@ -92,11 +93,16 @@
+ yield ''
+ yield desc
+ yield ''
++ yield parser.format_usage()
++ yield ''
+ for option_strings, help_ in options:
+ yield '.. option:: {0}'.format(', '.join(option_strings))
+ yield ''
+ yield ' ' + help_.replace('\n', ' \n')
+ yield ''
++ yield ''
++ for line in epilog.splitlines():
++ yield line
+
+ def run(self):
+ node = nodes.section()
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..3313f86
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+include_the_epilog
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/sphinxcontrib-autoprogram.git
More information about the debian-med-commit
mailing list