MCPcopy Index your code
hub / github.com/pex-tool/pex / installed_pex_wheel_venv_python

Function installed_pex_wheel_venv_python

testing/__init__.py:1032–1051  ·  view source on GitHub ↗
(python)

Source from the content-addressed store, hash-verified

1030
1031
1032def installed_pex_wheel_venv_python(python):
1033 # type: (str) -> str
1034
1035 from testing.pex_dist import wheel
1036
1037 interpreter = PythonInterpreter.from_binary(python)
1038 pex_wheel = wheel(LocalInterpreter.create(interpreter=interpreter))
1039 pex_venv_dir = os.path.join(
1040 PEX_TEST_DEV_ROOT, "pex_venvs", "0", str(interpreter.identity), CacheHelper.hash(pex_wheel)
1041 )
1042 with atomic_directory(pex_venv_dir) as atomic_dir:
1043 if not atomic_dir.is_finalized():
1044 venv = Virtualenv.create_atomic(atomic_dir, interpreter=interpreter)
1045 install_wheel_interpreter(pex_wheel, venv.interpreter)
1046 for _ in venv.rewrite_scripts(
1047 python=venv.interpreter.binary.replace(atomic_dir.work_dir, atomic_dir.target_dir)
1048 ):
1049 # Just ensure the re-writing iterator is driven to completion.
1050 pass
1051 return Virtualenv(pex_venv_dir).interpreter.binary

Callers 3

run_pex_toolsFunction · 0.90
run_pex3Function · 0.90
create_pex_commandFunction · 0.85

Calls 8

wheelFunction · 0.90
atomic_directoryFunction · 0.90
from_binaryMethod · 0.80
hashMethod · 0.80
is_finalizedMethod · 0.80
createMethod · 0.45
joinMethod · 0.45

Tested by 1

run_pex_toolsFunction · 0.72