Skip to content

Make --override-channels optional? #127

@hwpang

Description

@hwpang

Thanks for the fantastic package! I am developing a Python package that depends on a Julia package. I use ENV["JULIA_CONDAPKG_BACKEND"] = "Current" to have CondaPkg uses the pre-exisintg conda environment.

However, when CondaPkg finds dependencies by some other julia packages, it overrides the channels. Some packages within the pre-existing conda environment fail because they are not available through those channels. Please see the snippet from our CI below.

Are there ways to disable --override-channels?

I tried adding using Pkg; Pkg.add("CondaPkg"); using CondaPkg; CondaPkg.add_channel("defaults"); CondaPkg.add_channel("rmg"); CondaPkg.add_channel("conda-forge"); CondaPkg.add_channel("cantera"); but that doesn't work.

ERROR: Error building `ReactionMechanismSimulator`: 
    CondaPkg Found dependencies: /usr/share/miniconda3/envs/rmg_env/share/julia/packages/PythonCall/bb3ax/CondaPkg.toml
    CondaPkg Found dependencies: /usr/share/miniconda3/envs/rmg_env/share/julia/packages/PythonPlot/KcWMF/CondaPkg.toml
    CondaPkg Resolving changes
             + libstdcxx-ng
             + matplotlib
             + python
    CondaPkg Installing packages
             │ /usr/share/miniconda3/condabin/conda
             │ install
             │ -y
             │ -p /usr/share/miniconda3/envs/rmg_env
             │ --override-channels
             │ --no-channel-priority
             │ libstdcxx-ng[version='>=3.4,<13.0']
             │ matplotlib[version='>=1']
             │ python[version='>=3.7,<4',channel='conda-forge',build='*cpython*']
             └ -c conda-forge
Channels:
 - conda-forge
Platform: linux-64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... WARNING conda.models.version:get_matcher(562): Using .* with relational operator is superfluous and deprecated and will be removed in a future version of conda. Your spec was 1.8.0.*, but conda is ignoring the .* and treating it as 1.8.0
failed

PackagesNotFoundError: The following packages are not available from current channels:

  - cclib[version='>=1.6.3,<1.8.0.*']
  - cantera=2.6.*
  - conda-forge::python[version='>=3.7,<4',build=*cpython*]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions