conda-lock
conda-lock copied to clipboard
Support project-specific dep overrides / settings in pyproject.toml
It would be useful for conda-lock
's pyproject.toml
support if it could support configuring dependency-specific information directly in pyproject.toml
. I see at least two things that would be useful to configure:
- A dependency needs to be installed by Pip; this will probably only work with
-k env
, but would add the dependency to apip
section. - The Conda package name for a dependency (in case something isn't in the global rename file, or to remove dependency on it)
This could look something like:
[tool.cargo-lock.dependencies]
hpfrec = { source = "pip" }
msgpack = { conda-package = "python-msgpack" }
This is conda-lock not cargo-lock?
@mariusvniekerk Oops, sorry. Meant conda-lock
and "Conda package" - using both Conda & Cargo on different projects, brain slipped.
Okay, that sounds reasonable to me. Changes would probably be needed mostly in the source parser and maybe the spec handler class to carry along the pip dependencies.
Being able to specify which packages should be installed via pip would indeed be great.
My understanding is that it is possible for poetry users currently, but that users of PEP621 pyproject.toml are unfortunately out of luck.
I have given it a go in https://github.com/conda-incubator/conda-lock/pull/186 (for the pip item only)