Skip to content

Commit

Permalink
Fix channels_remap handling in extra_envs configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed Jun 20, 2024
1 parent 00fd9bb commit 723369b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions constructor/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,16 @@ def main_build(dir_path, output_dir='.', platform=cc_platform,
if env_name in ("base", "root"):
raise ValueError(f"Environment name '{env_name}' cannot be used")
for config_key, value in env_config.copy().items():
if isinstance(value, (list, tuple)):
env_config[config_key] = [val.strip() for val in value]
if config_key == "environment_file":
env_config[config_key] = abspath(join(dir_path, value))
elif config_key == "channels_remap":
env_config[config_key] = [
{"src": item["src"].strip(), "dest": "dest".strip()} for item in value
]
elif isinstance(value, (list, tuple)):
env_config[config_key] = [val.strip() for val in value]
else:
env_config[config_key] = value

try:
exe_name, exe_version = identify_conda_exe(info.get("_conda_exe"))
Expand Down

0 comments on commit 723369b

Please sign in to comment.