Skip to content

Commit

Permalink
Make conda_flags configurable (#790)
Browse files Browse the repository at this point in the history
Co-authored-by: Patrik Kovacs <[email protected]>
  • Loading branch information
patrix58 and Patrik Kovacs authored Apr 18, 2024
1 parent 47a02d9 commit 3c4547b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions conda-store-server/conda_store_server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ def _check_build_key_version(self, proposal):
config=True,
)

conda_flags = Unicode(
"--strict-channel-priority",
help="The flags to be passed through the CONDA_FLAGS environment variable during the environment build",
config=True,
)

conda_platforms = List(
[conda_utils.conda_platform(), "noarch"],
help="Conda platforms to download package repodata.json from. By default includes current architecture and noarch",
Expand Down
2 changes: 2 additions & 0 deletions conda-store-server/conda_store_server/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def build_conda_environment(db: Session, conda_store, build):
build.specification.spec
),
platforms=settings.conda_solve_platforms,
conda_flags=conda_store.conda_flags,
)

conda_store.storage.set(
Expand Down Expand Up @@ -275,6 +276,7 @@ def solve_conda_environment(db: Session, conda_store, solve: orm.Solve):
conda_command=settings.conda_command,
specification=schema.CondaSpecification.parse_obj(solve.specification.spec),
platforms=[conda_utils.conda_platform()],
conda_flags=conda_store.conda_flags,
)
conda_lock_spec = context.result

Expand Down

0 comments on commit 3c4547b

Please sign in to comment.