Re: [PATCH] Fix typo in Message.maildir_flags_to_tags
[notmuch-archives.git] / 33 / 5683e6532f64d0abfd6be03ac0fb94fc45645d
1 Return-Path: <wking@tremily.us>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 0CB85431FCB\r
6         for <notmuch@notmuchmail.org>; Sat, 12 Jul 2014 20:11:43 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
9 X-Spam-Flag: NO\r
10 X-Spam-Score: 0\r
11 X-Spam-Level: \r
12 X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
13         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001]\r
14         autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id ewsmFDVjJaaP for <notmuch@notmuchmail.org>;\r
18         Sat, 12 Jul 2014 20:11:37 -0700 (PDT)\r
19 Received: from qmta07.emeryville.ca.mail.comcast.net\r
20         (qmta07.emeryville.ca.mail.comcast.net [76.96.30.64])\r
21         by olra.theworths.org (Postfix) with ESMTP id B34D2431FBF\r
22         for <notmuch@notmuchmail.org>; Sat, 12 Jul 2014 20:11:29 -0700 (PDT)\r
23 Received: from omta05.emeryville.ca.mail.comcast.net ([76.96.30.43])\r
24         by qmta07.emeryville.ca.mail.comcast.net with comcast\r
25         id ReTr1o0030vp7WLA7fBU71; Sun, 13 Jul 2014 03:11:28 +0000\r
26 Received: from odin.tremily.us ([24.18.63.50])\r
27         by omta05.emeryville.ca.mail.comcast.net with comcast\r
28         id RfBS1o00F152l3L8RfBScn; Sun, 13 Jul 2014 03:11:27 +0000\r
29 Received: from mjolnir.tremily.us (unknown [192.168.0.150])\r
30         by odin.tremily.us (Postfix) with ESMTPS id 4D8711286F01;\r
31         Sat, 12 Jul 2014 20:11:26 -0700 (PDT)\r
32 Received: (nullmailer pid 31448 invoked by uid 1000);\r
33         Sun, 13 Jul 2014 03:10:43 -0000\r
34 From: "W. Trevor King" <wking@tremily.us>\r
35 To: notmuch@notmuchmail.org\r
36 Subject: [PATCH v3 1/5] doc: Allow rst2man.py as an alternative to rst2man\r
37 Date: Sat, 12 Jul 2014 20:10:33 -0700\r
38 Message-Id:\r
39  <2621721db05068dffb65b88cd50d2a5b49e967f5.1405220724.git.wking@tremily.us>\r
40 X-Mailer: git-send-email 1.9.1.353.gc66d89d\r
41 In-Reply-To: <cover.1405220724.git.wking@tremily.us>\r
42 References: <cover.1405220724.git.wking@tremily.us>\r
43 In-Reply-To: <cover.1405220724.git.wking@tremily.us>\r
44 References: <cover.1405220724.git.wking@tremily.us>\r
45 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
46         s=q20140121; t=1405221088;\r
47         bh=r1SmfwLyDrRrHkX+rVyzuMi4ZBAASHPV7xF3klv4OBQ=;\r
48         h=Received:Received:Received:Received:From:To:Subject:Date:\r
49         Message-Id;\r
50         b=YuAelciTpL56w9qBlsej7g1RrVs5sGwK+AFcDPAPmV1xjpZ971hTKln6zx5VTE6Vp\r
51         p6A2I7YhyqKnm9sbWf8CyD71Eyy9v/449tzlTiVxiiOL1f50kKgQSNYtfRhd7YSrC0\r
52         oGCyZ/bdL1iy3RFyN58zteZjRcuFltuYCjaY5CPTNVA0jLrL/fVVGSuhRlqAYZHRoe\r
53         vRpjMQkWxOXSxUiX8t5VzlWBkUKkvLrqnyzWi2FbiJo9LWF8OihtzJn8U3HRnn5sMG\r
54         f0KbeUPk1gXw5rmrS/ATCcG4i826vbWweiQD9BS+M8WN47AK1rEcIX1jNvsUhDwHtK\r
55         qX6ca0PLbDkYw==\r
56 Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
57 X-BeenThere: notmuch@notmuchmail.org\r
58 X-Mailman-Version: 2.1.13\r
59 Precedence: list\r
60 List-Id: "Use and development of the notmuch mail system."\r
61         <notmuch.notmuchmail.org>\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
65 List-Post: <mailto:notmuch@notmuchmail.org>\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
69 X-List-Received-Date: Sun, 13 Jul 2014 03:11:43 -0000\r
70 \r
71 Gentoo's dev-python/docutils-0.10 installs Docutils scripts with a\r
72 *.py extension, so I have /usr/bin/rst2man.py and no rst2man script.\r
73 This patch supports users with both types of systems by checking for\r
74 rst2man, falling back on rst2man.py, and giving up only if neither is\r
75 found.  Users can also set the new RST2MAN path variable explicitly\r
76 when they call Make:\r
77 \r
78   make RST2MAN=/my/custom/rst_to_man_converter build-man\r
79 \r
80 We pass the configured RST2MAN path through to prerst2man.py to use in\r
81 its system call.\r
82 \r
83 We can use a non-empty RST2MAN to check for the availability of an\r
84 rst2man program, so there's no need for a separate HAVE_RST2MAN.\r
85 However, we keep the existing HAVE_RST2MAN for consistency with\r
86 HAVE_SPHINX.\r
87 ---\r
88  configure          | 20 +++++++++++++++-----\r
89  doc/Makefile.local |  2 +-\r
90  doc/prerst2man.py  |  9 +++++----\r
91  3 files changed, 21 insertions(+), 10 deletions(-)\r
92 \r
93 diff --git a/configure b/configure\r
94 index 9bde2eb..20a2d5f 100755\r
95 --- a/configure\r
96 +++ b/configure\r
97 @@ -413,17 +413,23 @@ if hash sphinx-build > /dev/null 2>&1 && python -m sphinx.writers.manpage > /dev\r
98      printf "Yes.\n"\r
99      have_sphinx=1\r
100      have_rst2man=0\r
101 +    RST2MAN=\r
102  else\r
103      printf "No (falling back to rst2man).\n"\r
104      have_sphinx=0\r
105  \r
106      printf "Checking if rst2man is available... "\r
107 -    if rst2man -V > /dev/null 2>&1; then\r
108 -       printf "Yes.\n"\r
109 -       have_rst2man=1\r
110 -    else\r
111 -       printf "No (so will not install man pages).\n"\r
112 +    for RST2MAN in rst2man rst2man.py; do\r
113 +       if "${RST2MAN}" -V > /dev/null 2>&1; then\r
114 +           have_rst2man=1\r
115 +           printf "Yes (${RST2MAN}).\n"\r
116 +           break\r
117 +       fi\r
118 +       RST2MAN=\r
119 +    done\r
120 +    if [ -z "${RST2MAN}" ]; then\r
121         have_rst2man=0\r
122 +       printf "No (so will not install man pages).\n"\r
123      fi\r
124  fi\r
125  \r
126 @@ -820,6 +826,10 @@ HAVE_SPHINX=${have_sphinx}\r
127  # Whether there's a rst2man binary available for building documentation\r
128  HAVE_RST2MAN=${have_rst2man}\r
129  \r
130 +# The path to the rst2man program for building documentation.  Set to\r
131 +# an empty string if no such program is available.\r
132 +RST2MAN=${RST2MAN}\r
133 +\r
134  # The directory to which desktop files should be installed\r
135  desktop_dir = \$(prefix)/share/applications\r
136  \r
137 diff --git a/doc/Makefile.local b/doc/Makefile.local\r
138 index bbd4610..d96cdd5 100644\r
139 --- a/doc/Makefile.local\r
140 +++ b/doc/Makefile.local\r
141 @@ -49,7 +49,7 @@ ifeq ($(HAVE_SPHINX),1)\r
142             mv $(DOCBUILDDIR)/man/*.$${section} $(DOCBUILDDIR)/man/man$${section}; \\r
143         done\r
144  else ifeq ($(HAVE_RST2MAN),1)\r
145 -       $(prerst2man) $(srcdir)/doc $(DOCBUILDDIR)/man\r
146 +       $(prerst2man) "$(RST2MAN)" $(srcdir)/doc $(DOCBUILDDIR)/man\r
147  else\r
148         @echo "Fatal: build dependency fail."\r
149         @false\r
150 diff --git a/doc/prerst2man.py b/doc/prerst2man.py\r
151 index 437dea9..81ce817 100644\r
152 --- a/doc/prerst2man.py\r
153 +++ b/doc/prerst2man.py\r
154 @@ -4,8 +4,9 @@ from os.path import dirname, isdir\r
155  from os import makedirs, system\r
156  import re\r
157  \r
158 -sourcedir = argv[1]\r
159 -outdir = argv[2]\r
160 +rst2man = argv[1]\r
161 +sourcedir = argv[2]\r
162 +outdir = argv[3]\r
163  \r
164  if not isdir(outdir):\r
165      makedirs(outdir, 0o755)\r
166 @@ -59,5 +60,5 @@ for page in man_pages:\r
167      outfile.write("".join(lines))\r
168      outfile.close()\r
169  \r
170 -    system('set -x; rst2man {0} {1}/{2}.{3}'\r
171 -           .format(filename, outdir, page[0], page[4]))\r
172 +    system('set -x; {0} {1} {2}/{3}.{4}'\r
173 +           .format(rst2man, filename, outdir, page[0], page[4]))\r
174 -- \r
175 1.9.1.353.gc66d89d\r
176 \r