From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 7B5A7431FC7 for ; Sun, 9 Mar 2014 05:57:25 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mcLKAUyJonm5 for ; Sun, 9 Mar 2014 05:57:20 -0700 (PDT) Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id B0D7A431FBF for ; Sun, 9 Mar 2014 05:57:19 -0700 (PDT) Received: from remotemail by yantan.tethera.net with local (Exim 4.80) (envelope-from ) id 1WMdI7-0003qO-Ax; Sun, 09 Mar 2014 09:57:19 -0300 Received: (nullmailer pid 8489 invoked by uid 1000); Sun, 09 Mar 2014 12:57:08 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [Patch v3 4/4] doc: automatically read version from file Date: Sun, 9 Mar 2014 09:57:00 -0300 Message-Id: <1394369820-8319-5-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1394369820-8319-1-git-send-email-david@tethera.net> References: <1394369820-8319-1-git-send-email-david@tethera.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Mar 2014 12:57:25 -0000 This avoids having to recreate the update-man-versions rule --- doc/conf.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 6c2806d..a926fe4 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -14,10 +14,16 @@ master_doc = 'index' project = u'notmuch' copyright = u'2014, Carl Worth and many others' -# The short X.Y version. -version = '0.17' +location = os.path.dirname(__file__) + +for pathdir in ['.', '..']: + version_file = os.path.join(location,pathdir,'version') + if os.path.exists(version_file): + with open(version_file,'r') as infile: + version=infile.read().replace('\n','') + # The full version, including alpha/beta/rc tags. -release = '0.17' +release = version # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. -- 1.8.5.3