Il mer 21 giu 2023, 02:21 John Snow <js...@redhat.com> ha scritto: > Hi, this is ... a fairly incomplete series about trying to get iotests > to run out of the configure-time venv. I'm looking for some feedback, so > out to the list it goes. > > Primarily, I'm having doubts about these points: > > 1) I think I need something like "mkvenv install" in the first patch, > but mkvenv.py is getting pretty long... >
It's not a lot of code, but using pip install from configure might also be good enough, I don't know. 2) Is there a way to optimize the speed for patch #2? Maybe installing this package can be skipped until it's needed, but that means that > things like iotest's ./check might get complicated to support that. > > 3) I cheated quite a bit in patch 4 to use the correct Python to launch > iotests, but I'm wondering if there's a nicer way to solve this > more *completely*. > Maybe patch 4 can use distlib.scripts as well to create the check script in the build directory? (Yes that's another mkvenv functionality...) On a phone and don't have the docs at hand, so I am not sure. If not, your solution is good enough. Apart from this the only issue is the speed. IIRC having a prebuilt .whl would fix it, I think for Meson we observed that the slow part was building the wheel. Possibilities: 1) using --no-pep517 if that also speeds it up? 2) already removing the sources to qemu.qmp since that's the plan anyway; and then, if you want editability you can install the package with --user --editable, i.e. outside the venv Paolo > John Snow (6): > experiment: add mkvenv install > build, tests: Add qemu in-tree packages to pyvenv at configure time. > iotests: get rid of '..' in path environment output > iotests: use the correct python to run linters > iotests: use pyvenv/bin/python3 to launch child test processes > iotests: don't add qemu.git/python to PYTHONPATH > > configure | 31 +++++++++++++++++++++++++++ > python/scripts/mkvenv.py | 40 +++++++++++++++++++++++++++++++++++ > tests/qemu-iotests/linters.py | 2 +- > tests/qemu-iotests/testenv.py | 21 ++++++++++++------ > 4 files changed, 87 insertions(+), 7 deletions(-) > > -- > 2.40.1 > > >