cool-easter-32542
05/01/2023, 8:03 PMpex3 lock create. This lockfile contains the resolves for all third party dependencies for all platforms I care about. I can use --no-build to ensure all of the dependencies are wheels.
2. With the above lockfile create a dependencies pex with pex --lock pex.lock --venv -o depencies.pex
3. Create the venv: PEX_TOOLS=1 ./dependencies.pex venv ./venv
4. Iterate on my first party code by running PEX_EXTRA_SYS_PATH='./srcs' ./out.pex.venv/pex -m 'mymodule'. In my case srcs contains multiple packages.
I install the virtualenv for two reasons:
1. Having a virtualenv allows for tools like PyCharm to pick up all of my dependencies.
2. On my machine, I have observed that executing the pex directly has about 30ms of overhead which is just enough for me to go through with step 3 above.
I think pex should be able to collapse steps 2 and 3 above into a single command invocation. I would envision something like:
pex3 venv create --lock pex.lock -o venv
pantsbuild/pexcool-easter-32542
05/01/2023, 8:03 PM