()
| 132 | |
| 133 | |
| 134 | def _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 | |
| 153 | def _guess_pycache_prefix(): |
no test coverage detected