Re: [PATCH] Use the environment variable PYTHON if defined

From: Raghavendra D Prabhu
Date: Thu Mar 31 2011 - 15:15:24 EST


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 warning
printed rather than failing later.
* On Tue, Mar 29, 2011 at 06:14:37PM -0300, Arnaldo Carvalho de Melo <acme@xxxxxxxxxxxxxxxxxx> wrote:
Em Tue, Mar 29, 2011 at 04:02:07PM -0500, Michael Witten escreveu:
On Tue, Mar 29, 2011 at 15:40, Arnaldo Carvalho de Melo
<acme@xxxxxxxxxxxxxxxxxx> wrote:
> I think that the best course of action is to emit a warning and go

Good.

I'll make it so!

Thanks.
From: Raghavendra D Prabhu <rprabhu@xxxxxxxxxxx>
Date: Fri, 1 Apr 2011 00:17:36 +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@xxxxxxxxxxx>
---
tools/perf/feature-tests.mak | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tools/perf/feature-tests.mak b/tools/perf/feature-tests.mak
index b041ca6..ba287c9 100644
--- a/tools/perf/feature-tests.mak
+++ b/tools/perf/feature-tests.mak
@@ -84,6 +84,8 @@ define SOURCE_PYTHON_EMBED

int main(void)
{
+ if (PY_VERSION_HEX >= 0x03000000)
+ return 1;
Py_Initialize();
return 0;
}
--
1.7.4.2

Attachment: pgp00000.pgp
Description: PGP signature