pex
pex copied to clipboard
pex3 venv create accepts --bin-path but does not omit __main__.py
pex3 venv create
in 2.1.135
accepts a --bin-path
argument but does not populate a __main__.py
in the root of the venv so it does nothing. To fix this we can remove it from the args list or adjust pex3 venv create
to write the __main__.py
in the root of the venv.
I could document things better, but several of the options don't really make sense unless the venv is built from a --pex-repository
(--bin-path
and --scope
come to mind). What exactly are you trying to do?
I could document things better, but none of those options really make sense unless the venv is built from a
--pex-repository
. What exactly are you trying to do?
It was my understanding the produced __main__.py
would add the bin/
directory to the PATH
before launching the interpreter or console script as well as set the VIRTUAL_ENV
environment variable like the activate
script. I was using it as a slightly nicer activate
script.
It's not something I really relied on however and I think just following up with a documentation change for the next release would be the right thing to do since it is a slight divergence from running PEX_TOOLS=1 ./my.pex venv -b prepend -f ./venv
.
Ok, thanks - that helps. Yeah, the idea is a normal venv via requirements or from a --lock
is just a normal venv.