How to define source with PEP 508 style dependencies #10755
Replies: 3 comments
|
Looks like an extra entry is required: dependencies = ["xyz (>=0.0.1rc9,<0.0.2)"]
[tool.poetry.dependencies]
xyz = {source = "myrepo"} |
This comment was marked as spam.
This comment was marked as spam.
|
Yes, the extra entry you found is the intended way. PEP 508 strings can't name an index, so Poetry lets you add Poetry-only information on top of them under
[project]
dependencies = ["xyz (>=0.0.1rc9,<0.0.2)"]
[dependency-groups]
test = ["abc (>=3)"]
[tool.poetry.dependencies]
xyz = { source = "myrepo" }
[tool.poetry.group.test.dependencies]
abc = { source = "myrepo" }
[[tool.poetry.source]]
name = "myrepo"
url = "https://my.repo/simple/"
priority = "explicit"You don't need to write these by hand. I checked this with Poetry 2.5.2. Both commands produced exactly the layout above, and after |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
With the
[tool.poetry.dependencies]definition I would just sayxyz = { version = "0.0.1rc9", source = "myrepo" }- I can't find anywhere how to tell the source with PEP 508-style dependencies (dependenciesand[dependency-groups]).The only thing I can spot in the grammar is URL-based lookup.
All reactions