Skip to content
Snippets Groups Projects
Commit 0f3034f1 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

[scripts.create] Do not run pip install if no packages to install (closes #74)

parent 1eb35197
No related branches found
No related tags found
1 merge request!219Do not run pip install if no packages to install
Pipeline #50869 failed
...@@ -279,13 +279,16 @@ def create( ...@@ -279,13 +279,16 @@ def create(
if "create" in config: if "create" in config:
pip_extras_config = config["create"].get("pip_extras", "").split() pip_extras_config = config["create"].get("pip_extras", "").split()
pip_extras = _uniq(pip_extras_config + list(pip_extras)) pip_extras = _uniq(pip_extras_config + list(pip_extras))
logger.info("Pip-installing: %s", pip_extras) if pip_extras:
logger.info("Pip-installing: %s", pip_extras)
cmd = [conda, "run", "--live-stream", "--name", name, "pip", "install"]
cmd += pip_extras cmd = [conda, "run", "--live-stream", "--name", name, "pip", "install"]
if not dry_run: cmd += pip_extras
run_cmdline(cmd) if not dry_run:
run_cmdline(cmd)
else:
logger.info(f"Command: {' '.join(cmd)}")
else: else:
logger.info(f"Command: {' '.join(cmd)}") logger.info("No pip packages to install")
echo_normal(f'>>> Execute on your shell: "conda activate {name}"') echo_normal(f'>>> Execute on your shell: "conda activate {name}"')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment