Skip to content

Commit

Permalink
setup.py: de-prioritize defaults on multi-channel conda installs
Browse files Browse the repository at this point in the history
  • Loading branch information
torzdf committed Jul 10, 2024
1 parent ae3f68a commit 52b3842
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,9 @@ def _from_conda(self,
success = True
condaexe = ["conda", "install", "-y"]
if channels is not None:
if len(channels) > 1 and "defaults" in channels:
logger.debug("Setting default channel to lowest priority")
channels = [c for c in channels if c != "defaults"] + ["defaults"]
for channel in channels:
condaexe.extend(["-c", channel])
condaexe.append("--override-channels")
Expand Down

0 comments on commit 52b3842

Please sign in to comment.