Open Roger-luo opened 1 year ago
It also would be great to be able to build wheels by specifying dependency groups. I want to build a CPU version of my package that uses the CPU version of pytorch, and another that uses the GPU version and also installs a few other packages. poetry doesn't support this even though it has dependency groups.
Came here to say it would be nice to see this feature. Although I'm a bit confused as to what do we mean by dependency groups.
[project.optional-dependencies]
in pyproject.toml
. Is this what we are referring to?[dependency-groups]
table in pyproject.toml
, amongst other things.If we're referring to extras, I think rye already supports them. To add flask
as an extra under the group web
,
rye add flask --optional web
To add flask[async]
as an extra / optional dependency under the group web
,
rye add flask --features async --optional web
What's confusing is that if you need to do rye sync
with the web
extra included, you use --features
instead of --optional
.
rye sync --features web
rye sync --features web
This actually doesn't work for me, must have something to do with a limitation in virtual packages (#639)
I think this is a very convenient feature that
pdm
andpoetry
has. When I try to make a package that may use CUDA, I need to have a dependency that depends on hardware configurations, and a package manager has no means to know that thus I believe the best way is to let users decide which group of dependencies they should install. This is like the features at the package level.Currently, there is no way to specify both CPU and GPU dependencies with rye within one
pyproject.toml
, cargo also has something similar that allows one to specify dependencies based on the current crates' features. And I don't see a way of passing "extra"s in python'spyproject.toml
(e.g pass the extra[cuda12]
across packages) I hope this could be something rye can fix