qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: qemu-devel <qemu-devel@nongnu.org>, Ross Burton <ross@burtonini.com>
Subject: Re: [Qemu-devel] Making QEMU build with Python 3
Date: Wed, 9 Aug 2017 15:11:28 +0100	[thread overview]
Message-ID: <CAJSP0QVFHN3U7xxUS1iUY6Ap80tHs2t_wgT26+V86vA8=4BCWg@mail.gmail.com> (raw)
In-Reply-To: <d9c93599-1d2c-333e-dae0-7da8cc87b133@amsat.org>

On Wed, Aug 9, 2017 at 1:53 PM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> On 08/09/2017 07:16 AM, Stefan Hajnoczi wrote:
> [...]> Python scripts needed to build QEMU are the highest priority.  They
>>
>> are invoked by ./configure or make.  I've identified the following:
>>
>> scripts/signrom.py
>> scripts/qapi*.py
>> scripts/modules/module_block.py
>> scripts/tracetool*
>>
> [...]
>>
>> The fundamentals of adding Python 3 support are:
>>
>> 1. The script must work correctly under both Python 2.6+ and Python 3.
>
> [...]
>>
>> 3. Avoid third-party package dependencies - QEMU currently has none!
>
>
> This seems true for the "invoked by ./configure or make" set. However:
>
> scripts/qemu-gdb.py:20:import gdb
> scripts/qemugdb/aio.py:13:import gdb
> scripts/qemugdb/coroutine.py:16:import gdb
> scripts/qemugdb/mtree.py:18:import gdb
>
> I just checked gdb8 and can't confirm python3 build works.

Yes, this is a GDB extension written in Python.  The gdb module is
available in the interpreter environment that GDB sets up.

Even if GDB doesn't support Python 3 yet, they will eventually.  It's
okay if we cannot add Python 3 support to these scripts yet.

> Also another 3rd party (python3 compliant):
>
> scripts/analyze-migration.py:20:import numpy as np

Weird, this script seems to use numpy APIs for unpacking binary data
instead of the standard library struct module.  As far as I can tell
the usual numpy functionality isn't actually used.  It should be easy
to drop the numpy dependency.

> Off-topic but we might document how to install dependencies for those
> scripts?

The analyze-migration.py script doesn't have any documentation, AFAIK.

Stefan

  reply	other threads:[~2017-08-09 14:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-09 10:16 [Qemu-devel] Making QEMU build with Python 3 Stefan Hajnoczi
2017-08-09 12:53 ` Philippe Mathieu-Daudé
2017-08-09 14:11   ` Stefan Hajnoczi [this message]
2017-08-09 13:10 ` Daniel P. Berrange
2017-08-09 13:51   ` Stefan Hajnoczi

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='CAJSP0QVFHN3U7xxUS1iUY6Ap80tHs2t_wgT26+V86vA8=4BCWg@mail.gmail.com' \
    --to=stefanha@gmail.com \
    --cc=f4bug@amsat.org \
    --cc=qemu-devel@nongnu.org \
    --cc=ross@burtonini.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 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).