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
Could it be possible to add a way only to add a dependency to an environment based on another dependency/feature? With the upcoming release of Python 3.13 and some packages still needing to support it, writing features in the pixi.toml becomes a bit awkward. There are different ways to tackle it, but nothing feels great.
I create multiple features with the same dependencies and comment out those not yet supporting Python 3.13.
I split the features up into supported/not supported dependencies, and add both to all environments except the Python 3.13 ones.
I wait until every dependency in the feature supports Python 3.13 before I add it to the environment.
I'm overlooking something obvious.
Option 1 and 2 add many temporary configurations, which first need to be added and removed at some point. Option 3 is also less than ideal if 90% of the dependencies support Python 3.13.
Maybe a dependency could have a way to be ignored if another feature is also set in the environment; an example is given below. This will then install numba in the test-312 environment but not in the test-313 environment. In my case, it is not possible to add numba to the py312 feature as it is also used elsewhere where it should be removed from numba.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Note: First asked on Discord.
Could it be possible to add a way only to add a dependency to an environment based on another dependency/feature? With the upcoming release of Python 3.13 and some packages still needing to support it, writing features in the
pixi.toml
becomes a bit awkward. There are different ways to tackle it, but nothing feels great.Option 1 and 2 add many temporary configurations, which first need to be added and removed at some point. Option 3 is also less than ideal if 90% of the dependencies support Python 3.13.
Maybe a dependency could have a way to be ignored if another feature is also set in the environment; an example is given below. This will then install numba in the test-312 environment but not in the test-313 environment. In my case, it is not possible to add numba to the py312 feature as it is also used elsewhere where it should be removed from numba.
*)
ignore_with_features
is a suboptimal name.Beta Was this translation helpful? Give feedback.
All reactions