From: Stefan Weil <sw@weilnetz.de>
To: qemu-devel <qemu-devel@nongnu.org>
Cc: qemu-trivial@nongnu.org, Stefan Weil <sw@weilnetz.de>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-trivial] [PATCH (1.7?)] configure: Use -B switch only for Python versions which support it
Date: Sat, 16 Nov 2013 14:14:12 +0100 [thread overview]
Message-ID: <52876FA4.7020503@weilnetz.de> (raw)
In-Reply-To: <1384452423-7831-1-git-send-email-sw@weilnetz.de>
This patch is wrong!
Am 14.11.2013 19:07, schrieb Stefan Weil:
> Commit 1d984a67a95d88f3e708b077dab8adeb47c38c93 added the -B switch
> unconditionally. This breaks Python versions before 2.6 which don't
> support that switch.
>
> Now configure adds -B only if it is accepted by the Python interpreter.
>
> This modification introduces a small incompatiblity because -B might now
> also be added when configure was called with --python=PYTHON_INTERPRETER.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
> configure | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> This is an optional patch. We need it for Python versions older than 5 years
> if we don't want to use the workaround --python=python.
>
> I don't think it is needed for 1.7, but maybe other people think different.
>
> Stefan
>
> diff --git a/configure b/configure
> index 9a02610..3c25816 100755
> --- a/configure
> +++ b/configure
> @@ -593,7 +593,7 @@ fi
>
> : ${make=${MAKE-make}}
> : ${install=${INSTALL-install}}
> -: ${python=${PYTHON-python -B}}
> +: ${python=${PYTHON-python}}
> : ${smbd=${SMBD-/usr/sbin/smbd}}
>
> # Default objcc to clang if available, otherwise use CC
> @@ -1420,6 +1420,13 @@ if ! $python -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_in
> "Use --python=/path/to/python to specify a supported Python."
> fi
>
> +# The -B switch was added in Python 2.6.
> +# If it is supplied, compiled files are not written.
> +# Use it for Python versions which support it.
> +if $python -B -c 'import sys; sys.exit(0)' 2>/dev/null; then
> + $python="$python -B"
It should be
python="$python -B"
I'll send a v2.
Stefan
WARNING: multiple messages have this Message-ID (diff)
From: Stefan Weil <sw@weilnetz.de>
To: qemu-devel <qemu-devel@nongnu.org>
Cc: qemu-trivial@nongnu.org, Stefan Weil <sw@weilnetz.de>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH (1.7?)] configure: Use -B switch only for Python versions which support it
Date: Sat, 16 Nov 2013 14:14:12 +0100 [thread overview]
Message-ID: <52876FA4.7020503@weilnetz.de> (raw)
In-Reply-To: <1384452423-7831-1-git-send-email-sw@weilnetz.de>
This patch is wrong!
Am 14.11.2013 19:07, schrieb Stefan Weil:
> Commit 1d984a67a95d88f3e708b077dab8adeb47c38c93 added the -B switch
> unconditionally. This breaks Python versions before 2.6 which don't
> support that switch.
>
> Now configure adds -B only if it is accepted by the Python interpreter.
>
> This modification introduces a small incompatiblity because -B might now
> also be added when configure was called with --python=PYTHON_INTERPRETER.
>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
> configure | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> This is an optional patch. We need it for Python versions older than 5 years
> if we don't want to use the workaround --python=python.
>
> I don't think it is needed for 1.7, but maybe other people think different.
>
> Stefan
>
> diff --git a/configure b/configure
> index 9a02610..3c25816 100755
> --- a/configure
> +++ b/configure
> @@ -593,7 +593,7 @@ fi
>
> : ${make=${MAKE-make}}
> : ${install=${INSTALL-install}}
> -: ${python=${PYTHON-python -B}}
> +: ${python=${PYTHON-python}}
> : ${smbd=${SMBD-/usr/sbin/smbd}}
>
> # Default objcc to clang if available, otherwise use CC
> @@ -1420,6 +1420,13 @@ if ! $python -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_in
> "Use --python=/path/to/python to specify a supported Python."
> fi
>
> +# The -B switch was added in Python 2.6.
> +# If it is supplied, compiled files are not written.
> +# Use it for Python versions which support it.
> +if $python -B -c 'import sys; sys.exit(0)' 2>/dev/null; then
> + $python="$python -B"
It should be
python="$python -B"
I'll send a v2.
Stefan
next prev parent reply other threads:[~2013-11-16 13:14 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 18:07 [Qemu-trivial] [PATCH (1.7?)] configure: Use -B switch only for Python versions which support it Stefan Weil
2013-11-14 18:07 ` [Qemu-devel] " Stefan Weil
2013-11-14 18:13 ` [Qemu-trivial] " Stefan Weil
2013-11-14 18:13 ` [Qemu-devel] " Stefan Weil
2013-11-14 18:17 ` [Qemu-trivial] " Peter Maydell
2013-11-14 18:17 ` Peter Maydell
2013-11-15 9:19 ` [Qemu-trivial] " Stefan Hajnoczi
2013-11-15 9:19 ` [Qemu-devel] " Stefan Hajnoczi
2013-11-16 10:07 ` [Qemu-trivial] " Michael Tokarev
2013-11-16 10:07 ` [Qemu-devel] " Michael Tokarev
2013-11-16 11:10 ` [Qemu-trivial] [Qemu-devel] " Peter Maydell
2013-11-16 11:10 ` [Qemu-devel] [Qemu-trivial] " Peter Maydell
2013-11-16 11:45 ` [Qemu-trivial] [Qemu-devel] " Michael Tokarev
2013-11-16 11:45 ` [Qemu-devel] [Qemu-trivial] " Michael Tokarev
2013-11-16 11:49 ` [Qemu-trivial] [Qemu-devel] " Peter Maydell
2013-11-16 11:49 ` [Qemu-devel] [Qemu-trivial] " Peter Maydell
2013-11-16 13:14 ` Stefan Weil [this message]
2013-11-16 13:14 ` [Qemu-devel] " Stefan Weil
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=52876FA4.7020503@weilnetz.de \
--to=sw@weilnetz.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=stefanha@redhat.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.