New comment by tornaria on void-packages repository https://github.com/void-linux/void-packages/pull/43946#issuecomment-1571016360 Comment: While we are at this, I was going to suggest using a venv instead of `--destdir` + `PYTHONPATH` trick. Indeed, I found some packages that fail when `PYTHONPATH` is messed upon. The gist of it would be something like: ``` local testdir="${wrksrc}/.xbps-tmpdir/$(date +%s)" python3 -m venv --system-site-packages --without-pip ${testdir} ${testdir}/bin/python3 -m installer ${make_install_args} ${make_install_target:-dist/*.whl} PATH=${testdir}/bin:$PATH ${make_check_pre} python3 -m \ pytest ${testjobs} ${make_check_args} ${make_check_target} ``` This is needed to fix check for `python3-coverage`, see: https://github.com/void-linux/void-packages/pull/44160/commits/4366b1ccf70c3dd531416aec2f75f95f5ad5827c. I also needed it to fix check for `python3-pytest-cov`, however in that case another hack was necessary so I would still need to rewrite `do_check()`. See: https://github.com/void-linux/void-packages/pull/44160/commits/65eb1057479d8dff616e56dcafacf3d587657170.