bitter-ability-32190
02/21/2023, 10:04 PMVenvPex
it has some guards against the venv being deleted, but if I delete the venv dir I see path/to/venv_dir/pex: No such file or directory
Working backwards, when we make the PEX with --venv --seed verbose
I see pex
in the output JSON having the right path, but the second portion isn't related to any portion in PEX-INFO
. Where is that second hash coming from?bitter-ability-32190
02/22/2023, 1:48 AMmain
, so something related to my changes 😕bitter-ability-32190
02/22/2023, 2:08 AMpython
path in the hash, which is absolute and changes per daemon restart 😢bitter-ability-32190
02/22/2023, 2:17 AMFailed to find a compatible PEX_PYTHON=./__toolchain/versions/3.7.16/bin/python.
Examined the following interpreters:
1.) /home/josh/.cache/pants/pants_dev_deps/Linux.x86_64.x86_64.py38.venv/bin/python3.8 CPython==3.8.10
No interpreter compatible with the requested constraints was found:
A distribution for black could not be resolved for /home/josh/.cache/pants/pants_dev_deps/Linux.x86_64.x86_64.py38.venv/bin/python3.8.
Found 1 distribution for black that do not apply:
1.) The wheel tags for black 22.6.0 are cp37-cp37m-manylinux2014_x86_64, cp37-cp37m-manylinux_2_17_x86_64 which do not match the supported tags of /home/josh/.cache/pants/pants_dev_deps/Linux.x86_64.x86_64.py38.venv/bin/python3.8:
cp38-cp38-manylinux_2_31_x86_64
... 598 more ...
So close...bitter-ability-32190
02/22/2023, 4:20 PMsys.executable
is always an absolute path, it's impossible to build a PEX in one sandbox using a relative Python path, then consume it with the venv pex hack in another sandbox as the interpreter hash can never be the same.
CC @enough-analyst-54434 am I understanding this right? I'm looking at https://github.com/pantsbuild/pex/blob/main/pex/variables.py#L789enough-analyst-54434
02/22/2023, 4:28 PMenough-analyst-54434
02/22/2023, 4:29 PMpython
is stable.bitter-ability-32190
02/22/2023, 4:29 PMenough-analyst-54434
02/22/2023, 4:29 PMbitter-ability-32190
02/22/2023, 4:29 PMenough-analyst-54434
02/22/2023, 4:30 PMenough-analyst-54434
02/22/2023, 4:31 PMbitter-ability-32190
02/22/2023, 4:32 PMbitter-ability-32190
02/22/2023, 4:32 PMenough-analyst-54434
02/22/2023, 4:33 PMenough-analyst-54434
02/22/2023, 4:33 PMbitter-ability-32190
02/22/2023, 7:49 PM