qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: <tony.nguyen@bt.com>
To: <crosa@redhat.com>, <qemu-devel@nongnu.org>, <peter.maydell@linaro.org>
Cc: julio.montes@intel.com, ehabkost@redhat.com
Subject: Re: [Qemu-devel] [PATCH] configure: more resilient Python version capture
Date: Sat, 24 Aug 2019 07:32:24 +0000	[thread overview]
Message-ID: <1566631944235.10945@bt.com> (raw)
In-Reply-To: <20190823215451.26276-1-crosa@redhat.com>

> -python_version=$($python -V 2>&1 | sed -e 's/Python\ //')
> +python_version=$(python2 -c 'import sys; print("%d.%d.%d" % (sys.version_info[0], sys.version_info[1], sys.version_info[2]))' 2>/dev/null)

On a Python 3 only system, configure will no longer print the version.

e.g.         
/* snip */
install           install
python            python3 -B ()
slirp support     git 
/* snip */

> @@ -6511,6 +6511,7 @@ if ! $python -c 'import sys; sys.exit(sys.version_info < (3,0))'; then
>    echo
>    echo "warning: Python 2 support is deprecated" >&2 
>    echo "warning: Python 3 will be required for building future versions of QEMU" >&2 
> +  python2="y"
>  fi  
...
> -echo "PYTHON_VERSION=$python_version" >> $config_host_mak
> +echo "PYTHON2=$python2" >> $config_host_mak
...
> -ifneq ($(findstring v2,"v$(PYTHON_VERSION)"),v2)
> +ifneq ($(PYTHON2),y)

Succinctly, if Python 3.

We can further ween the world off Python 2 by replacing python2="y" for 
python3="y" and PYTHON2 for PYTHON3.

  reply	other threads:[~2019-08-24  7:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23 21:54 [Qemu-devel] [PATCH] configure: more resilient Python version capture Cleber Rosa
2019-08-24  7:32 ` tony.nguyen [this message]
2019-08-25 15:07   ` Peter Maydell
2019-08-26 13:09   ` Cleber Rosa

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=1566631944235.10945@bt.com \
    --to=tony.nguyen@bt.com \
    --cc=crosa@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=julio.montes@intel.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).