-
-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Virtual packages cannot have optional-dependencies
#639
Comments
I cannot reproduce this. Here the section from the pyproject.toml: [project.optional-dependencies]
docs = ["mkdocs-material>=9.5.9", "mkdocs-markdownextradata-plugin>=0.2.5"] Lock without features:
Lock with features:
What also confuses me a bit is this command you posted:
That's not a valid command and if it were, it would not produce the
|
Yes, you are right about this command. # wrong command
$ rye add --features=docs mkdocs-material mkdocs-markdownextradata-plugin
# right command
$ rye add --optional=docs mkdocs-material mkdocs-markdownextradata-plugin Reproducible commands:
The
|
That is a known limitation but it's not documented. For now I will add it to the docs. |
lock
and sync
does not recognise project.optional-dependencies
.optional-dependencies
Thanks @mitsuhiko to clarify! 👍 Ok then after mentioning this issue in the docs, close this issue. |
Ohh, you have done it already in (a4b0016). |
I will reopen it as it's still a limitation that should eventually be fixed. |
This seems like exactly the use case PEP 735 is intended for:
Would look like this: [project]
# more fields...
dependencies = []
requires-python = ">= 3.8"
[project.scripts]
hello = "learn_rye:hello"
[dependency-groups] # <- new
docs = [
"mkdocs-material>=9.5.9",
]
[tool.rye]
managed = true
virtual = true
dev-dependencies = [] For a virtual package, extras are just "dependency groups" anyway. |
Steps to Reproduce
pyproject.toml
.pyproject.toml
contains...lock
/sync
withdocs
dependencies (docs reference):rye lock --features=docs # OR rye sync --features=docs
Expected Result
The
requirements.lock
file must contains themkdocs-material
andmkdocs--markdownextradata-plugin
packages for installation.Actual Result
Lockfile(s) does not contains the
docs
dependency packages for installation.The actual
requirements.lock
file:Version Info
Stacktrace
No response
Edited: I actually written the Expected Result in Actual Result and vice-versa. 😞
The text was updated successfully, but these errors were encountered: