Skip to content

Commit

Permalink
Remap local channel to conda-forge.
Browse files Browse the repository at this point in the history
I don't think there is a way to remap the local channel to different channels depending on the package, e.g. spyder-kernels to use conda-forge/label/spyder_kernels_rc and spyder to use conda-forge/label/spyder_dev. However, I think conda-forge will be sufficient to allow the updater to perform its actions.
  • Loading branch information
mrclary committed Apr 9, 2024
1 parent 136c877 commit 7521f07
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions installers-conda/build_installers.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from pathlib import Path
import platform
import re
from subprocess import check_call
from subprocess import run
import sys
from textwrap import dedent, indent
from time import time
Expand Down Expand Up @@ -217,6 +217,14 @@ def _get_condarc():
return str(file)


def _get_conda_bld_path_url():
bld_path_url = "file://"
if WINDOWS:
bld_path_url += "/"
bld_path_url += Path(os.getenv('CONDA_BLD_PATH')).as_posix()
return bld_path_url


def _definitions():
condarc = _get_condarc()
definitions = {
Expand Down Expand Up @@ -246,6 +254,12 @@ def _definitions():
"specs": [k + v for k, v in specs.items()],
},
},
"channels_remap": [
{
"src": _get_conda_bld_path_url(),
"dest": "https://conda.anaconda.org/conda-forge"
}
]
}

if not args.no_local:
Expand Down Expand Up @@ -371,7 +385,7 @@ def _constructor():

yaml.dump(definitions, BUILD / "construct.yaml")

check_call(cmd_args, env=env)
run(cmd_args, check=True, env=env)


def licenses():
Expand Down

0 comments on commit 7521f07

Please sign in to comment.