Force resolving dependency via pip #186
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use the
[tool.conda-lock.dependencies]
section in thepyproject.toml
file to force resolving a package via pip, fixing (part of) #115.This is useful in particular for packages that are not present on conda channels.
Note that
{source = 'pypi'}
syntax to flag a package which should be installed via pip to match how conda-locks interprets poetry sections. In case of poetry,source
designate the pypi repository where the package should be downloaded. i.e. it could be a different (e.g. private) repository, in which case conda-lock should most likely also flag it as a pip installable-package. This is a question broader than this PR though, so I assume this should be OK here, and dealt with more broadly.{source = 'pypi'}
in the[tool.conda-lock.dependencies]
is not present in the packages dependencies (specified outside of[tool.conda-lock.dependencies]
), it will not be added as a dependency. This makes sense to me as something downloaded via pip should be a python dependency. Currently it will be ignored silently - maybe a warning would be handy here?