python: create qemu packages
authorJohn Snow <jsnow@redhat.com>
Thu, 27 May 2021 21:16:53 +0000 (17:16 -0400)
committerJohn Snow <jsnow@redhat.com>
Tue, 1 Jun 2021 20:21:21 +0000 (16:21 -0400)
commitbeb6b57b3b1a1fe6ebc208d2edc12b504f69e29f
tree30d99cee1032ce3fccf1c1d7f509f6fd49f2d037
parent7f0a143b0cd7b2b7c05b55b1b6814747ef612ce3
python: create qemu packages

move python/qemu/*.py to python/qemu/[machine, qmp, utils]/*.py and
update import directives across the tree.

This is done to create a PEP420 namespace package, in which we may
create subpackages. To do this, the namespace directory ("qemu") should
not have any modules in it. Those files will go into new 'machine',
'qmp' and 'utils' subpackages instead.

Implement machine/__init__.py making the top-level classes and functions
from its various modules available directly inside the package. Change
qmp.py to qmp/__init__.py similarly, such that all of the useful QMP
library classes are available directly from "qemu.qmp" instead of
"qemu.qmp.qmp".

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Cleber Rosa <crosa@redhat.com>
Message-id: 20210527211715.394144-10-jsnow@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
26 files changed:
python/.isort.cfg [new file with mode: 0644]
python/qemu/.flake8 [deleted file]
python/qemu/.isort.cfg [deleted file]
python/qemu/__init__.py [deleted file]
python/qemu/accel.py [deleted file]
python/qemu/console_socket.py [deleted file]
python/qemu/machine.py [deleted file]
python/qemu/machine/.flake8 [new file with mode: 0644]
python/qemu/machine/__init__.py [new file with mode: 0644]
python/qemu/machine/console_socket.py [new file with mode: 0644]
python/qemu/machine/machine.py [new file with mode: 0644]
python/qemu/machine/pylintrc [new file with mode: 0644]
python/qemu/machine/qtest.py [new file with mode: 0644]
python/qemu/pylintrc [deleted file]
python/qemu/qmp.py [deleted file]
python/qemu/qmp/__init__.py [new file with mode: 0644]
python/qemu/qtest.py [deleted file]
python/qemu/utils.py [deleted file]
python/qemu/utils/__init__.py [new file with mode: 0644]
python/qemu/utils/accel.py [new file with mode: 0644]
tests/acceptance/avocado_qemu/__init__.py
tests/acceptance/virtio-gpu.py
tests/qemu-iotests/300
tests/qemu-iotests/iotests.py
tests/vm/aarch64vm.py
tests/vm/basevm.py