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

From: Michael Witten
Date: Thu Mar 31 2011 - 16:29:46 EST


On Thu, Mar 31, 2011 at 14:15, Raghavendra D Prabhu <rprabhu@xxxxxxxxxxx> 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 warning 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/