All of lore.kernel.org
 help / color / mirror / Atom feed
From: Raghavendra D Prabhu <rprabhu@wnohang.net>
To: Michael Witten <mfwitten@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Use the environment variable PYTHON if defined
Date: Sun, 3 Apr 2011 02:16:31 +0530	[thread overview]
Message-ID: <20110402204630.GA5738@Xye> (raw)
In-Reply-To: <AANLkTi=8YiYNUj0o4=XqrRqmNjUq7zPXVEpsysJ6KbMx@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1102 bytes --]

* On Thu, Mar 31, 2011 at 03:29:12PM -0500, Michael Witten <mfwitten@gmail.com> wrote:
>On Thu, Mar 31, 2011 at 14:15, Raghavendra D Prabhu <rprabhu@wnohang.net> wrote:
>> Hi,
>>    Regarding the point where it warns about python-devel not existing,
>> it looks like that existing feature test will pass even when python3 is
>> chosen and fail at a later stage. So I made this little change to feature
>> test so that it fails when python3 is chosen and perf build succeeds with
>> the war ning printed rather than failing later.
>
>Good point.
>
>However, try-cc does not run the resulting program after
>compiling it, so the test still succeeds.
>
>What you want to do is make the compilation fail;
>to do so, move your test here:
>
>  #include <Python.h>
>
>  #if PY_VERSION_HEX >= 0x03000000
>    #error "Python 3 is not yet supported; set PYTHON{,_CONFIG}"
>
>  int main(void)
>  ...
>
>P.S.
>Put your replies below the email quote.
Thanks. I have attached the corrected patch and also have tested it.
--------------------------
Raghavendra Prabhu
GPG ID:D72BE977


[-- Attachment #1.2: 0001-Added-a-py3k-test-to-feature-tests.patch --]
[-- Type: text/plain, Size: 929 bytes --]

From 8c52bc1f2acb16d3bc12ea43c82665ebef93285a Mon Sep 17 00:00:00 2001
From: Raghavendra D Prabhu <rprabhu@wnohang.net>
Date: Sun, 3 Apr 2011 01:59:12 +0530
Subject: [PATCH] Added a py3k test to feature tests.

Currently, make fails at a later stage when python-devel test succeeds
incorrectly for Py3k. This fixes that.

Signed-off-by: Raghavendra D Prabhu <rprabhu@wnohang.net>
---
 tools/perf/feature-tests.mak |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/tools/perf/feature-tests.mak b/tools/perf/feature-tests.mak
index b041ca6..8e5d16a 100644
--- a/tools/perf/feature-tests.mak
+++ b/tools/perf/feature-tests.mak
@@ -82,6 +82,10 @@ ifndef NO_LIBPYTHON
 define SOURCE_PYTHON_EMBED
 #include <Python.h>
 
+#if PY_VERSION_HEX >= 0x03000000
+	#error "Python 3 is not yet supported; set PYTHON{,_CONFIG}"
+#endif
+
 int main(void)
 {
 	Py_Initialize();
-- 
1.7.4.2


[-- Attachment #2: Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2011-04-02 20:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-26 22:44 [PATCH] Use the environment variable PYTHON if defined Raghavendra D Prabhu
2011-03-28 14:47 ` Arnaldo Carvalho de Melo
2011-03-28 22:36   ` Michael Witten
2011-03-29 18:15     ` Raghavendra D Prabhu
2011-03-29 19:15       ` Michael Witten
2011-03-29 20:40         ` Arnaldo Carvalho de Melo
2011-03-29 21:02           ` Michael Witten
2011-03-29 21:14             ` Arnaldo Carvalho de Melo
2011-03-31 19:15               ` Raghavendra D Prabhu
2011-03-31 20:29                 ` Michael Witten
2011-04-02 20:46                   ` Raghavendra D Prabhu [this message]
2011-04-02 22:40                     ` Michael Witten
2011-03-31 15:37           ` Michael Witten
2011-04-08 21:17             ` Raghavendra D Prabhu
2011-04-09  1:24               ` Michael Witten
2011-04-02 21:46                 ` [PATCH 2/2] perf tools: Makefile: PYTHON{,_CONFIG} to bandage Python 3 incompatibility Michael Witten
2011-04-09  1:12                 ` [PATCH 1/2] perf tools: Makefile: Clean up `python/perf.so' rule Michael Witten
2011-04-09 18:42                 ` [PATCH] Use the environment variable PYTHON if defined Raghavendra D Prabhu
2011-04-09 20:34                   ` Michael Witten
2011-04-12 20:52                     ` [PULL] Improve Python 3 handling Michael Witten
2011-04-21  9:22     ` [tip:perf/core] perf tools: Makefile: PYTHON{,_CONFIG} to bandage Python 3 incompatibility tip-bot for Michael Witten

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110402204630.GA5738@Xye \
    --to=rprabhu@wnohang.net \
    --cc=acme@ghostprotocols.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfwitten@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.