Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 5C929429E39 for ; Sun, 19 Jun 2011 12:54:17 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] 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 HMa8N1JxV1wz for ; Sun, 19 Jun 2011 12:54:16 -0700 (PDT) Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 948A1429E31 for ; Sun, 19 Jun 2011 12:54:15 -0700 (PDT) Received: from zancas.localnet (fctnnbsc30w-142167176081.pppoe-dynamic.High-Speed.nb.bellaliant.net [142.167.176.81]) (authenticated bits=0) by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id p5JJsBWt024288 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Sun, 19 Jun 2011 16:54:12 -0300 Received: from bremner by zancas.localnet with local (Exim 4.76) (envelope-from ) id 1QYO4R-00074y-HZ; Sun, 19 Jun 2011 16:54:11 -0300 From: david@tethera.net To: notmuch@notmuchmail.org Subject: [PATCH 2/2] Do not import notmuch in setup.py. Date: Sun, 19 Jun 2011 16:53:43 -0300 Message-Id: <1308513223-27163-3-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.7.5.3 In-Reply-To: <1308513223-27163-1-git-send-email-david@tethera.net> References: <1308507380-26896-1-git-send-email-david@tethera.net> <1308513223-27163-1-git-send-email-david@tethera.net> Cc: David Bremner 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, 19 Jun 2011 19:54:17 -0000 From: David Bremner Importing notmuch loads the notmuch shared library. When building without a system install of notmuch, this requires e.g. setting LD_LIBRARY_PATH for building and fails completely for cleaning. --- bindings/python/setup.py | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/bindings/python/setup.py b/bindings/python/setup.py index e4a3a25..1497bc4 100644 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -1,7 +1,22 @@ #!/usr/bin/env python +import os +import re from distutils.core import setup -from notmuch import __VERSION__ + +def get_version(): + file = open('notmuch/__init__.py') + try: + for line in file: + if re.match('__VERSION__\s*=\s*',line) != None: + version = line.split('=', 1)[1] + return eval(version, {}, {}) + finally: + file.close() + raise IOError('Unexpected end-of-file') + +__VERSION__=get_version() + setup(name='notmuch', version=__VERSION__, description='Python binding of the notmuch mail search and indexing library.', -- 1.7.5.3