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.52k stars 258 forks source link

Add `--site-packages-copies` for external venvs. #2470

Closed jsirois closed 1 month ago

jsirois commented 1 month ago

When creating a venv external to the PEX_ROOT via either pex3 venv create ... or PEX_TOOLS=1 ./my.pex venv ... you can now specify --site-packages-copies to ensure all code populated in the venv is isolated from the PEX_ROOT cache. Although this takes more space on disk, it may make sense to use when you expect the venv might be tampered with or used for experimentation that might alter its files; otherwise contaminating the PEX_ROOT cache.

Fixes #2313

zmanji commented 1 month ago

🚀