[PATCH 2/2] Do not import notmuch in setup.py.
authordavid <david@tethera.net>
Sun, 19 Jun 2011 19:53:43 +0000 (16:53 +2100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:38:37 +0000 (09:38 -0800)
85/126a5114288fa39f2a27465ed9efa7df11dc92 [new file with mode: 0644]

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