You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Interpret optional extras in pyproject.toml as pixi features #1062
#999 will bring in initial pyproject.toml support.
I propose to interpret groups of extras dependencies in [project.optional-dependencies] as pixi features specifying some pypi dependencies.
Each of these could then be mapped to a pixi environment, depending on one or several features (a group of extra dependencies can contain a reference to another group of optional dependencies of the package itself).
I think it would make sense to create a tool.pixi.environments table during init.
A couple of questions:
Should that table be amended automatically after init, to propagate changes in [project.optional-dependencies]? I would assume not as one may not want to generate an environment per group of extra. Another option would be to keep it in sync, but for a list of excluded extras
Should we define a single solve group across all environments? I would assume so, as I think it maps better with how the groups of extra dependencies are being used in python.
So for instance:
[project]
name = 'my-package'dependencies = [
# ...
]
[project.optional-dependencies]
# development dependency groupsextra1 = [
# ...
]
# feature dependency groupsextra2 = [
# ...
]
extra3 = [
"my-package[extra2]", # could also be .[extra2]# ...
]
@ruben-arts the PR for this is in. I am not 100% sure, but I believe that being able to lock all the extra groups consistently like this is pretty unique to pixi :-)
Activity
olivier-lacroix commentedon Mar 29, 2024
@ruben-arts the PR for this is in. I am not 100% sure, but I believe that being able to lock all the extra groups consistently like this is pretty unique to pixi :-)