[conda] Support Pixi's use of pyproject.toml to declare conda dependencies? #453
Labels
integration
Integrating FawltyDeps with other tools
needs-real-projects-test
This issue is more easily tackled once we have a project in `real_project` that illustrate the issue
research-needed
type: feature request
Thanks to @ctcjab's comment for highlighting Pixi's use of
pyproject.toml
in conda projects. Looking at https://pixi.sh/latest/advanced/pyproject_toml/ Pixi allows a combinations of PyPI dependencies and Conda dependencies to be declared inpyproject.toml
:AFAIUI, PyPI dependencies are declared in the
project.dependencies
section ofpyproject.toml
, and seems to obey PEP621. (This part should thus already be supported by FawltyDeps.)Next, Conda dependencies are declared in a
[tool.pixi.dependencies]
section. In the case of overlaps (a dependency name that occurs in both sections), the Conda dependency is preferred and the PyPI dependency is ignored.The dependencies specifiers in the
[tool.pixi.dependencies]
section initially appear to be formatted in the same as PEP621'sproject.dependencies
(see https://packaging.python.org/en/latest/specifications/dependency-specifiers/ for details), but according to https://pixi.sh/latest/reference/project_configuration/#the-dependencies-tables there are slight differences in these formats:It is not yet clear to me whether the conda version specifiers are a subset of the PyPI version specifiers (and can thus reuse the same parser), or if a separate parser is necessary.
What does seem clear is that the "pinned" version specifiers that specify an exact package build elsewhere in the Conda ecosystem (e.g. the
requests=2.32.3=py38h06a4308_0
string that would appear in a conda-generatedenvironment.yml
orrequirements.txt
) are NOT allowed by Pixi here.Note that Pixi (like Conda) also supports non-Python projects (which is outside FawltyDeps' scope), and also have their own
pixi.toml
file used (instead ofpyproject.toml
) to configure Pixi projects. Supportingpixi.toml
in FawltyDeps might be a valuable feature at some point, but is outside the scope of this issue.The text was updated successfully, but these errors were encountered: