pex-tool / pex

A tool for generating .pex (Python EXecutable) files, lock files and venvs.
https://docs.pex-tool.org/
Apache License 2.0
2.83k stars 266 forks source link

Fix `--venv` cached Python interpreter info. #2579

Closed jsirois closed 3 weeks ago

jsirois commented 3 weeks ago

Previously, the work dir path of the atomic_directory used to create the venv would leak into various cached paths in the PythonInterpreter INTERP-INFO file. Now, these paths are corrected at creation time.

This is work towards pex3 cache prune --last-access which will need to iterate cached interpreters to find any associated with venvs such that the interpreter can be pruned when the venv is pruned.