Skip to content

Commit d47fa2f

Browse files
committed
Add michellab channel when --install-bss-deps is used.
1 parent 5d42986 commit d47fa2f

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

setup.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,14 +216,22 @@ def _add_to_dependencies(dependencies, lines):
216216

217217
_is_conda_prepped = False
218218

219-
def conda_install(dependencies):
219+
def conda_install(dependencies, install_bss_reqs=False):
220220
"""Install the passed list of dependencies using conda"""
221221

222222
conda_exe = conda
223223

224224
global _is_conda_prepped
225225

226226
if not _is_conda_prepped:
227+
if install_bss_reqs:
228+
cmd = "%s config --prepend channels michellab/label/dev" % conda_exe
229+
print("Activating michellab channel channel using: '%s'" % cmd)
230+
status = subprocess.run(cmd.split())
231+
if status.returncode != 0:
232+
print("Failed to add michellab channel!")
233+
sys.exit(-1)
234+
227235
print("\nSetting channel priorities to favour conda-forge")
228236
cmd = "%s config --prepend channels conda-forge" % conda_exe
229237
print("Activating conda-forge channel using: '%s'" % cmd)
@@ -297,7 +305,7 @@ def install_requires(install_bss_reqs=False):
297305
conda_install(["mamba"])
298306
mamba = find_mamba()
299307

300-
conda_install(dependencies)
308+
conda_install(dependencies, install_bss_reqs)
301309

302310

303311
def add_default_cmake_defs(cmake_defs, ncores):

0 commit comments

Comments
 (0)