If I have 2 groups of project.optional-dependencies in my pyproject.toml, is there a way to specify that installing one group installs the dependencies of the other?
E.g.
[project.optional-dependencies]
test = [
"pytest",
"pytest-asyncio",
"pytest-cov",
]
dev = [
"flake8",
"flake8-import-order",
"black",
]
How can I specify that installing myproj[dev] also installs [test].
Not sure from which pip version this is possible, on 22.2.2 it is, on 20.0.2 it isn't.
[project]
name = "my-pkg"
[project.optional-dependencies]
test = [
"pytest",
"pytest-asyncio",
"pytest-cov",
]
dev = [
"flake8",
"flake8-import-order",
"black",
"my-pkg[test]"
]
source => https://hynek.me/articles/python-recursive-optional-dependencies/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With