Skip to content

Commit

Permalink
update and uninstall only take pkg names
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimergp committed Sep 19, 2023
1 parent f5327ef commit 4a5ac16
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
8 changes: 5 additions & 3 deletions conda_smithy/configure_feedstock.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import conda_build.variants
import conda_build.conda_interface
import conda_build.render
from conda.models.match_spec import MatchSpec

from copy import deepcopy

Expand Down Expand Up @@ -1956,6 +1957,7 @@ def _load_forge_config(forge_dir, exclusive_config_file, forge_yml=None):
f"Invalid conda_build_tool: {config['conda_build_tool']}. "
f"Valid values are: {valid_build_tools}."
)
# NOTE: Currently assuming these dependencies are name-only (no version constraints)
if config["conda_build_tool"] == "mambabuild":
config["conda_build_tool_deps"] = "conda-build boa"
elif config["conda_build_tool"] == "conda-build+conda-libmamba-solver":
Expand All @@ -1968,6 +1970,7 @@ def _load_forge_config(forge_dir, exclusive_config_file, forge_yml=None):
f"Invalid conda_install_tool: {config['conda_install_tool']}. "
f"Valid values are: {valid_install_tools}."
)
# NOTE: Currently assuming these dependencies are name-only (no version constraints)
if config["conda_install_tool"] == "mamba":
config["conda_install_tool_deps"] = "mamba"
elif config["conda_install_tool"] in "conda":
Expand Down Expand Up @@ -2029,9 +2032,8 @@ def _load_forge_config(forge_dir, exclusive_config_file, forge_yml=None):
if config["provider"]["linux_s390x"] in {"default", "native"}:
config["provider"]["linux_s390x"] = ["travis"]

config["remote_ci_setup"] = _santize_remote_ci_setup(
config["remote_ci_setup"]
)
config["remote_ci_setup"] = _santize_remote_ci_setup(config["remote_ci_setup"])
config["remote_ci_setup_names"] = [MatchSpec(pkg).name for pkg in config["remote_ci_setup"]]

# Older conda-smithy versions supported this with only one
# entry. To avoid breakage, we are converting single elements
Expand Down
4 changes: 2 additions & 2 deletions conda_smithy/templates/build_steps.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ CONDARC
pip {{ conda_install_tool_deps }} {{ conda_build_tool_deps }} {{ " ".join(remote_ci_setup) }}
{%- if conda_build_tool_deps != "" or conda_install_tool_deps != "" %}
{{ conda_install_tool }} update --update-specs --yes --quiet --channel conda-forge \
pip {{ conda_install_tool_deps }} {{ conda_build_tool_deps }} {{ " ".join(remote_ci_setup) }}
pip {{ conda_install_tool_deps }} {{ conda_build_tool_deps }} {{ " ".join(remote_ci_setup_names) }}
{%- endif %}
{% if local_ci_setup %}
{{ conda_install_tool }} uninstall --quiet --yes --force {{ " ".join(remote_ci_setup) }}
{{ conda_install_tool }} uninstall --quiet --yes --force {{ " ".join(remote_ci_setup_names)}}
pip install --no-deps ${RECIPE_ROOT}/.
{%- endif %}
# set up the condarc
Expand Down
4 changes: 2 additions & 2 deletions conda_smithy/templates/run_osx_build.sh.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ conda activate base
pip {{ conda_install_tool_deps }} {{ conda_build_tool_deps }} {{ " ".join(remote_ci_setup) }}
{%- if conda_build_tool_deps != "" or conda_install_tool_deps != "" %}
{{ conda_install_tool }} update --update-specs --yes --quiet --channel conda-forge \
pip {{ conda_install_tool_deps }} {{ conda_build_tool_deps }} {{ " ".join(remote_ci_setup) }}
pip {{ conda_install_tool_deps }} {{ conda_build_tool_deps }} {{ " ".join(remote_ci_setup_names) }}
{%- endif %}

{% if local_ci_setup %}
{{ conda_install_tool }} uninstall --quiet --yes --force {{ " ".join(remote_ci_setup) }}
{{ conda_install_tool }} uninstall --quiet --yes --force {{ " ".join(remote_ci_setup_names) }}
pip install --no-deps {{ recipe_dir }}/.
{%- endif %}

Expand Down
2 changes: 1 addition & 1 deletion conda_smithy/templates/run_win_build.bat.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if !errorlevel! neq 0 exit /b !errorlevel!

{%- if local_ci_setup %}
echo Overriding conda-forge-ci-setup with local version
{{ conda_install_tool }}.exe uninstall --quiet --yes --force {{ " ".join(remote_ci_setup) }}"
{{ conda_install_tool }}.exe uninstall --quiet --yes --force {{ " ".join(remote_ci_setup_names) }}
if !errorlevel! neq 0 exit /b !errorlevel!
pip install --no-deps ".\{{ recipe_dir }}\."
if !errorlevel! neq 0 exit /b !errorlevel!
Expand Down

0 comments on commit 4a5ac16

Please sign in to comment.