INNER CODE UNIT · Python
installation_environment
PKU-EMBL/BASALT · BASALT_setup_China_mainland.py:357
def installation_environment(
manager: str,
condarc: Path,
pip_index: Optional[str],
mamba_root_prefix: Path,
) -> Dict[str, str]:
"""Build child-only environment variables for package downloads."""
environment = os.environ.copy()
environment["CONDARC"] = str(condarc)
environment["CONDA_CHANNEL_PRIORITY"] = "strict"
environment["MAMBA_CHANNEL_PRIORITY"] = "strict"
environment["PIP_DEFAULT_TIMEOUT"] = "120"
environment["PIP_RETRIES"] = "10"
if manager == "micromamba":
environment["MAMBA_ROOT_PREFIX"] = str(mamba_root_prefix)
if pip_index:
environment["PIP_INDEX_URL"] = pip_index
environment["UV_DEFAULT_INDEX"] = pip_index