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

2023-05-11 Thread John Snow
On Thu, May 11, 2023, 12:14 PM Paolo Bonzini wrote: > > > Il gio 11 mag 2023, 17:58 John Snow 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. Shoul

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

2023-05-11 Thread Paolo Bonzini
Il gio 11 mag 2023, 17:58 John Snow 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

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

2023-05-11 Thread John Snow
On Thu, May 11, 2023, 3:02 AM Paolo Bonzini wrote: > On 5/11/23 05:54, John Snow wrote: > > +if checkpip(): > > +# We ran ensurepip. We need to re-run post_init...! > > +args = [sys.executable, __file__, "post_init"] > > +subprocess.run(args, check=True) > > +r

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

2023-05-11 Thread Paolo Bonzini
On 5/11/23 05:54, John Snow wrote: +if checkpip(): +# We ran ensurepip. We need to re-run post_init...! +args = [sys.executable, __file__, "post_init"] +subprocess.run(args, check=True) +return + # Finally, generate a 'pip' script so the venv is usable in

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

2023-05-10 Thread Paolo Bonzini
On 5/11/23 05:54, John Snow wrote: This is an experiment: by using pip's internal vendored distlib, we can generate script entry points for Windows, Mac and Linux using distlib's mechanisms. This is the same mechanism used when running "pip install", so it will be consistent with the most common

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

2023-05-10 Thread John Snow
This is an experiment: by using pip's internal vendored distlib, we can generate script entry points for Windows, Mac and Linux using distlib's mechanisms. This is the same mechanism used when running "pip install", so it will be consistent with the most common method of package installation on all