1 Return-Path: <bremner@tesseract.cs.unb.ca>
\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 4312F431FB6
\r
6 for <notmuch@notmuchmail.org>; Sun, 18 Jan 2015 08:56:11 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=2.438 tagged_above=-999 required=5
\r
12 tests=[DNS_FROM_AHBL_RHSBL=2.438] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id rYHZkS1ABWhk for <notmuch@notmuchmail.org>;
\r
16 Sun, 18 Jan 2015 08:56:08 -0800 (PST)
\r
17 Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net
\r
19 (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
\r
20 (No client certificate requested)
\r
21 by olra.theworths.org (Postfix) with ESMTPS id E0381431FAF
\r
22 for <notmuch@notmuchmail.org>; Sun, 18 Jan 2015 08:56:07 -0800 (PST)
\r
23 Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim
\r
24 4.80) (envelope-from <bremner@tesseract.cs.unb.ca>)
\r
25 id 1YCt8I-0007jp-1t; Sun, 18 Jan 2015 16:55:26 +0000
\r
26 Received: (nullmailer pid 20082 invoked by uid 1000); Sun, 18 Jan 2015
\r
28 From: David Bremner <david@tethera.net>
\r
29 To: David Bremner <david@tethera.net>, "notmuch@notmuchmail.org"
\r
30 <notmuch@notmuchmail.org>
\r
31 Subject: [PATCH] doc: remove support for rst2man
\r
32 Date: Sun, 18 Jan 2015 17:55:10 +0100
\r
33 Message-Id: <1421600110-19988-1-git-send-email-david@tethera.net>
\r
34 X-Mailer: git-send-email 2.1.4
\r
35 In-Reply-To: <87k312x4i2.fsf@maritornes.cs.unb.ca>
\r
36 References: <87k312x4i2.fsf@maritornes.cs.unb.ca>
\r
37 X-BeenThere: notmuch@notmuchmail.org
\r
38 X-Mailman-Version: 2.1.13
\r
40 List-Id: "Use and development of the notmuch mail system."
\r
41 <notmuch.notmuchmail.org>
\r
42 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
43 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
44 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
45 List-Post: <mailto:notmuch@notmuchmail.org>
\r
46 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
47 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
48 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
49 X-List-Received-Date: Sun, 18 Jan 2015 16:56:11 -0000
\r
51 It was becoming increasingly complicated to support rst2man, and there
\r
52 were apparently not many people that relied on it.
\r
55 Now's your chance to tell us how useful rst2man support is to you.
\r
59 configure | 20 +++--------------
\r
60 doc/INSTALL | 13 -----------
\r
61 doc/Makefile.local | 7 ++----
\r
62 doc/prerst2man.py | 64 ------------------------------------------------------
\r
63 6 files changed, 13 insertions(+), 104 deletions(-)
\r
64 delete mode 100644 doc/prerst2man.py
\r
66 diff --git a/INSTALL b/INSTALL
\r
67 index b543c50..eaccd93 100644
\r
70 @@ -75,14 +75,11 @@ Talloc, and zlib which are each described below:
\r
71 Building Documentation
\r
72 ----------------------
\r
74 -By default the documentation for notmuch is built using sphinx.
\r
75 +To build the documentation for notmuch you need at least version 1.0
\r
76 +of sphinx (Jul. 2010).
\r
78 Sphinx is available from www.sphinx-doc.org.
\r
80 -If you prefer, you can build the man pages using rst2man, from the
\r
81 -python docutils package. See doc/INSTALL for details.
\r
84 Installing Dependencies from Packages
\r
85 -------------------------------------
\r
87 diff --git a/NEWS b/NEWS
\r
88 index abb5ad7..53e06aa 100644
\r
92 Notmuch 0.20 (UNRELEASED)
\r
97 +Support for using rst2man in place of sphinx to build the
\r
98 +docmumentation has been removed.
\r
103 diff --git a/configure b/configure
\r
104 index 137acea..a6b49ae 100755
\r
107 @@ -447,19 +447,9 @@ printf "Checking if sphinx is available and supports nroff output... "
\r
108 if hash sphinx-build > /dev/null 2>&1 && ${python} -m sphinx.writers.manpage > /dev/null 2>&1 ; then
\r
113 - printf "No (falling back to rst2man).\n"
\r
114 + printf "No (so will not install man pages).\n"
\r
117 - printf "Checking if rst2man is available... "
\r
118 - if rst2man -V > /dev/null 2>&1; then
\r
122 - printf "No (so will not install man pages).\n"
\r
127 libdir_in_ldconfig=0
\r
128 @@ -848,9 +838,6 @@ HAVE_EMACS = ${have_emacs}
\r
129 # Whether there's a sphinx-build binary available for building documentation
\r
130 HAVE_SPHINX=${have_sphinx}
\r
132 -# Whether there's a rst2man binary available for building documentation
\r
133 -HAVE_RST2MAN=${have_rst2man}
\r
135 # Whether there's a doxygen binary available for building api documentation
\r
136 HAVE_DOXYGEN=${have_doxygen}
\r
138 @@ -978,9 +965,8 @@ cat > sh.config <<EOF
\r
139 # Whether the Xapian version in use supports compaction
\r
140 NOTMUCH_HAVE_XAPIAN_COMPACT=${have_xapian_compact}
\r
142 -# Whether there's either sphinx or rst2man available for building
\r
144 -NOTMUCH_HAVE_MAN=$((have_sphinx || have_rst2man))
\r
145 +# do we have man pages?
\r
146 +NOTMUCH_HAVE_MAN=$((have_sphinx))
\r
148 # Name of python interpreter
\r
149 NOTMUCH_PYTHON=${python}
\r
150 diff --git a/doc/INSTALL b/doc/INSTALL
\r
151 index e37c2b9..0585476 100644
\r
155 This file contains some more detailed information about building and
\r
156 installing the documentation.
\r
158 -Building with sphinx.
\r
159 ----------------------
\r
161 - You need sphinx at least version 1.0.
\r
163 - You can build build and install man pages with 'make install-man'
\r
164 @@ -12,13 +9,3 @@ Building with sphinx.
\r
165 (currently only the man pages) with
\r
167 'make install-{man|info|html|pdf}'
\r
169 -Building the man pages
\r
170 -----------------------
\r
172 -- You can build the man pages with rst2man (from python-docutils) with
\r
175 -- Currently there is no support to automagically install the resulting
\r
176 - nroff files, but it should work to modify the target install-man
\r
177 - in doc/Makefile.local.
\r
178 diff --git a/doc/Makefile.local b/doc/Makefile.local
\r
179 index e7d0bac..0bdf2e1 100644
\r
180 --- a/doc/Makefile.local
\r
181 +++ b/doc/Makefile.local
\r
182 @@ -7,7 +7,6 @@ SPHINXOPTS := -q
\r
183 SPHINXBUILD = sphinx-build
\r
184 DOCBUILDDIR := $(dir)/_build
\r
186 -prerst2man := python $(srcdir)/$(dir)/prerst2man.py
\r
187 mkdocdeps := python $(srcdir)/$(dir)/mkdocdeps.py
\r
189 # Internal variables.
\r
190 @@ -50,8 +49,6 @@ ifeq ($(HAVE_SPHINX),1)
\r
191 mkdir -p $(DOCBUILDDIR)/man/man$${section}; \
\r
192 mv $(DOCBUILDDIR)/man/*.$${section} $(DOCBUILDDIR)/man/man$${section}; \
\r
194 -else ifeq ($(HAVE_RST2MAN),1)
\r
195 - $(prerst2man) $(srcdir)/doc $(DOCBUILDDIR)/man
\r
197 @echo "Fatal: build dependency fail."
\r
199 @@ -79,10 +76,10 @@ endif
\r
201 # Do not try to build or install man pages if a man page converter is
\r
203 -ifeq ($(HAVE_SPHINX)$(HAVE_RST2MAN),00)
\r
204 +ifeq ($(HAVE_SPHINX),0)
\r
207 - @echo "No sphinx or rst2man, will not install man pages."
\r
208 + @echo "No sphinx, will not install man pages."
\r
210 build-man: ${MAN_GZIP_FILES}
\r
211 install-man: ${MAN_GZIP_FILES}
\r
212 diff --git a/doc/prerst2man.py b/doc/prerst2man.py
\r
213 deleted file mode 100644
\r
214 index 968722a..0000000
\r
215 --- a/doc/prerst2man.py
\r
218 -from sys import argv
\r
219 -from datetime import date
\r
220 -from os.path import dirname, isdir
\r
221 -from os import makedirs, system
\r
224 -sourcedir = argv[1]
\r
227 -if not isdir(outdir):
\r
228 - makedirs(outdir, 0o755)
\r
230 -with open(sourcedir + "/conf.py") as cf:
\r
234 -def header(file, startdocname, command, description, authors, section):
\r
242 -:Manual section: {5:d}
\r
243 -:Manual group: {6:s}
\r
246 -'-' * len(description),
\r
248 -'-' * len(description),
\r
249 -date.today().isoformat(), release, section, project))
\r
251 -blankre = re.compile("^\s*$")
\r
252 -for page in man_pages:
\r
253 - outdirname = outdir + '/' + dirname(page[0])
\r
254 - if not isdir(outdirname):
\r
255 - makedirs(outdirname, 0o755)
\r
256 - filename = outdir + '/' + page[0] + '.rst'
\r
257 - outfile = open(filename, 'w')
\r
258 - infile = open(sourcedir + '/' + page[0] + '.rst', 'r')
\r
260 - # this is a crude hack. We look for the first blank line, and
\r
261 - # insert the rst2man header there.
\r
263 - # XXX consider really parsing input
\r
266 - lines = infile.readlines()
\r
267 - for line in lines:
\r
268 - outfile.write(line)
\r
269 - if (blankre.match(line)):
\r
271 - count = count + 1
\r
273 - del lines[0:count + 1]
\r
275 - header(outfile, *page)
\r
277 - outfile.write("".join(lines))
\r
280 - system('set -x; rst2man {0} {1}/{2}.{3}'
\r
281 - .format(filename, outdir, page[0], page[4]))
\r