qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 27/27] mkvenv.py: experiment; use distlib to generate script


From: John Snow
Subject: Re: [PATCH 27/27] mkvenv.py: experiment; use distlib to generate script entry points
Date: Thu, 11 May 2023 12:16:03 -0400



On Thu, May 11, 2023, 12:14 PM Paolo Bonzini <pbonzini@redhat.com> wrote:


Il gio 11 mag 2023, 17:58 John Snow <jsnow@redhat.com> ha scritto:
I'll make that simplifying change, which will also allow me to just put the import in the global scope instead of trying to do it JIT to work around ensurepip shenanigans. Should be a few less "I know this is bad" comments for the linters, too.

I don't think you can do that because, until you are running in the new venv, you aren't guaranteed to have either distlib or pip. Once in the venv you'll get the latter via ensurepip, if it wasn't already present in the system site-packages.

Paolo

Yeah, not without a *little* trickery. It still needs a try/except but it can be moved up.

Or I could leave well enough alone and worry about cleaning up imports when we move to 3.8


reply via email to

[Prev in Thread] Current Thread [Next in Thread]