1 Return-Path: <schnouki@schnouki.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 07142429E37
\r
6 for <notmuch@notmuchmail.org>; Wed, 7 Dec 2011 01:46:33 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5
\r
12 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1]
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id yLp3wh3jQUyb for <notmuch@notmuchmail.org>;
\r
17 Wed, 7 Dec 2011 01:46:32 -0800 (PST)
\r
18 Received: from ks3536.kimsufi.com (schnouki.net [87.98.217.222])
\r
19 by olra.theworths.org (Postfix) with ESMTP id 38192429E26
\r
20 for <notmuch@notmuchmail.org>; Wed, 7 Dec 2011 01:46:32 -0800 (PST)
\r
21 Received: from thor.loria.fr (thor.loria.fr [152.81.12.250])
\r
22 by ks3536.kimsufi.com (Postfix) with ESMTPSA id 271096A0028;
\r
23 Wed, 7 Dec 2011 10:46:30 +0100 (CET)
\r
24 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=schnouki.net;
\r
25 s=key-schnouki; t=1323251190;
\r
26 bh=8qA6k34z1+ycCRIZYHYiFdffnSgIq5uMciCzVgIspqw=;
\r
27 h=From:To:Subject:Date:Message-Id:In-Reply-To:References;
\r
28 b=CZw2RJ/8gq0AEVWYMsq+fHtdARjky1bUyQQvjX7QC/9PvTVqzIhxoEHLSx41PLMkF
\r
29 ljaGG/VwR5ofHef0uSt3xaiWBDnbHQzUOHUbe6VbiKffbyUTf8eeciIQX3QLeYDDvQ
\r
30 2rAwOyNuvpHxQG3Cz+nOYXP+IHL5jBqg3cARBaFA=
\r
31 From: Thomas Jost <schnouki@schnouki.net>
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: [PATCH 2/2] test: use python2 instead of python if available
\r
34 Date: Wed, 7 Dec 2011 10:46:18 +0100
\r
35 Message-Id: <1323251178-20409-2-git-send-email-schnouki@schnouki.net>
\r
36 X-Mailer: git-send-email 1.7.8
\r
37 In-Reply-To: <1323251178-20409-1-git-send-email-schnouki@schnouki.net>
\r
38 References: <1323251178-20409-1-git-send-email-schnouki@schnouki.net>
\r
39 X-BeenThere: notmuch@notmuchmail.org
\r
40 X-Mailman-Version: 2.1.13
\r
42 List-Id: "Use and development of the notmuch mail system."
\r
43 <notmuch.notmuchmail.org>
\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
45 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
47 List-Post: <mailto:notmuch@notmuchmail.org>
\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
50 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
51 X-List-Received-Date: Wed, 07 Dec 2011 09:46:33 -0000
\r
53 Some distros (Arch Linux) ship Python as python2 and Python 3 as python.
\r
54 Checking for python2 is necessary for the Python tests to work on these
\r
57 test/test-lib.sh | 9 ++++++++-
\r
58 1 files changed, 8 insertions(+), 1 deletions(-)
\r
60 diff --git a/test/test-lib.sh b/test/test-lib.sh
\r
61 index 519bd84..155ad3c 100644
\r
62 --- a/test/test-lib.sh
\r
63 +++ b/test/test-lib.sh
\r
64 @@ -923,8 +923,14 @@ test_python() {
\r
65 export LD_LIBRARY_PATH=$TEST_DIRECTORY/../lib
\r
66 export PYTHONPATH=$TEST_DIRECTORY/../bindings/python
\r
68 + # Some distros (e.g. Arch Linux) ship Python 2.* as /usr/bin/python2,
\r
69 + # most others as /usr/bin/python. So first try python2, and fallback to
\r
70 + # python if python2 doesn't exist.
\r
72 + [[ "$test_missing_external_prereq_python2_" = t ]] && cmd=python
\r
74 (echo "import sys; _orig_stdout=sys.stdout; sys.stdout=open('OUTPUT', 'w')"; cat) \
\r
79 test_reset_state_ () {
\r
80 @@ -1157,3 +1163,4 @@ test_declare_external_prereq emacsclient
\r
81 test_declare_external_prereq gdb
\r
82 test_declare_external_prereq gpg
\r
83 test_declare_external_prereq python
\r
84 +test_declare_external_prereq python2
\r