Skip to content

Commit

Permalink
fix: Workaround conda-mambabuild needs local channel
Browse files Browse the repository at this point in the history
prepopulated if referenced via "-c local" for newer conda/conda-build
versions (not sure why, TBH).

Signed-off-by: Marcel Bargull <[email protected]>
  • Loading branch information
mbargull committed Apr 15, 2024
1 parent 6074685 commit e5017b5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions bioconda_utils/docker_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,13 @@
# will exist in the container but will be empty. Channels expect at least
# a linux-64/linux-aarch64 and noarch directory within that directory, so we
# make sure it exists before adding the channel.
mkdir -p {self.container_staging}/linux-64
mkdir -p {self.container_staging}/linux-aarch64
mkdir -p {self.container_staging}/noarch
conda index {self.container_staging}
# Also ensure conda-build's local channel directory exists the same way.
for local_channel in '/opt/conda/conda-bld' '{self.container_staging}'; do
mkdir -p "${{local_channel}}"/linux-64
mkdir -p "${{local_channel}}"/linux-aarch64
mkdir -p "${{local_channel}}"/noarch
conda index "${{local_channel}}"
done
conda config --add channels file://{self.container_staging} 2> >(
grep -vF "Warning: 'file://{self.container_staging}' already in 'channels' list, moving to the top" >&2
)
Expand Down

0 comments on commit e5017b5

Please sign in to comment.