MCPcopy
hub / github.com/lightningpixel/modly / cleanPythonEnv

Function cleanPythonEnv

electron/main/python-setup.ts:37–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35 * Strips vars that could redirect imports or installs to the user's system Python.
36 */
37export function cleanPythonEnv(): NodeJS.ProcessEnv {
38 const {
39 PYTHONHOME, PYTHONPATH, PYTHONSTARTUP, PYTHONUSERBASE,
40 PIP_USER, PIP_TARGET, PIP_PREFIX, PIP_REQUIRE_VIRTUALENV,
41 VIRTUAL_ENV, CONDA_PREFIX,
42 ...rest
43 } = process.env
44 void PYTHONHOME; void PYTHONPATH; void PYTHONSTARTUP; void PYTHONUSERBASE
45 void PIP_USER; void PIP_TARGET; void PIP_PREFIX; void PIP_REQUIRE_VIRTUALENV
46 void VIRTUAL_ENV; void CONDA_PREFIX
47 return rest
48}
49
50// ─── Path helpers ─────────────────────────────────────────────────────────────
51

Callers 3

_startMethod · 0.90
createVenvFunction · 0.85
installRequirementsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected