1 Return-Path: <bremner@tethera.net>
\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 ED560431FD4
\r
6 for <notmuch@notmuchmail.org>; Wed, 5 Mar 2014 06:56:52 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 ZWUuVHErZ-Wt for <notmuch@notmuchmail.org>;
\r
16 Wed, 5 Mar 2014 06:56:47 -0800 (PST)
\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])
\r
18 (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 664F6431FBF
\r
21 for <notmuch@notmuchmail.org>; Wed, 5 Mar 2014 06:56:47 -0800 (PST)
\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)
\r
23 (envelope-from <bremner@tethera.net>)
\r
24 id 1WLDFX-00049a-1d; Wed, 05 Mar 2014 10:56:47 -0400
\r
25 Received: (nullmailer pid 10387 invoked by uid 1000); Wed, 05 Mar 2014
\r
27 From: David Bremner <david@tethera.net>
\r
28 To: notmuch@notmuchmail.org
\r
29 Subject: [PATCH 4/4] doc: automagically read version from file
\r
30 Date: Wed, 5 Mar 2014 10:56:35 -0400
\r
31 Message-Id: <1394031395-8014-5-git-send-email-david@tethera.net>
\r
32 X-Mailer: git-send-email 1.8.5.3
\r
33 In-Reply-To: <1394031395-8014-1-git-send-email-david@tethera.net>
\r
34 References: <1394031395-8014-1-git-send-email-david@tethera.net>
\r
35 X-BeenThere: notmuch@notmuchmail.org
\r
36 X-Mailman-Version: 2.1.13
\r
38 List-Id: "Use and development of the notmuch mail system."
\r
39 <notmuch.notmuchmail.org>
\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
41 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
43 List-Post: <mailto:notmuch@notmuchmail.org>
\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
47 X-List-Received-Date: Wed, 05 Mar 2014 14:56:53 -0000
\r
49 This avoids having to recreate the update-man-versions rule
\r
51 doc/conf.py | 12 +++++++++---
\r
52 1 file changed, 9 insertions(+), 3 deletions(-)
\r
54 diff --git a/doc/conf.py b/doc/conf.py
\r
55 index 6c2806d..a926fe4 100644
\r
58 @@ -14,10 +14,16 @@ master_doc = 'index'
\r
59 project = u'notmuch'
\r
60 copyright = u'2014, Carl Worth and many others'
\r
62 -# The short X.Y version.
\r
64 +location = os.path.dirname(__file__)
\r
66 +for pathdir in ['.', '..']:
\r
67 + version_file = os.path.join(location,pathdir,'version')
\r
68 + if os.path.exists(version_file):
\r
69 + with open(version_file,'r') as infile:
\r
70 + version=infile.read().replace('\n','')
\r
72 # The full version, including alpha/beta/rc tags.
\r
76 # List of patterns, relative to source directory, that match files and
\r
77 # directories to ignore when looking for source files.
\r