MCPcopy Create free account
hub / github.com/catboost/catboost / _get_source_root

Function _get_source_root

library/python/runtime_py3/__res.py:134–150  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

132
133
134def _get_source_root():
135 env_value = _probe(_os.environ, env_source_root)
136 if env_value:
137 return env_value
138
139 if EXTERNAL_PY_FILES_MODE:
140 path = _guess_source_root()
141 if path:
142 return path
143
144 raise RuntimeError(
145 "Cannot find source root: binary is built in external-py-files mode, but no env.var. Y_PYTHON_SOURCE_ROOT is specified. Current working directory: " + _os.getcwd()
146 )
147
148 if YA_IDE_VENV:
149 return _init_venv()
150 return None
151
152
153def _guess_pycache_prefix():

Callers 1

__res.pyFile · 0.85

Calls 3

_probeFunction · 0.85
_guess_source_rootFunction · 0.85
_init_venvFunction · 0.85

Tested by

no test coverage detected