diff --git a/docs/config/dependency.md b/docs/config/dependency.md index 79dd796b1..0a9c1fa9c 100644 --- a/docs/config/dependency.md +++ b/docs/config/dependency.md @@ -147,6 +147,25 @@ foo[cli,crypto]==1.* Note that the features come immediately after the package name, before any [version specifiers](#version-specifiers). +One feature group can extend another feature group by using "self-dependency". For example, for a project called `awesome_project`, the `dev` feature group in the following `pyproject.toml` file would select everything in the `crypto` feature group, plus `black`: + +=== ":octicons-file-code-16: pyproject.toml" + + ```toml + [project] + name = "awesome-project" + + [project.optional-dependencies] + crypto = [ + "PyJWT", + "cryptography", + ] + dev = [ + "awesome-project[crypto]", + "black", + ] + ``` + ## Direct references Instead of using normal [version specifiers](#version-specifiers) and fetching packages from an index like PyPI, you can define exact sources using [direct references](https://peps.python.org/pep-0440/#direct-references) with an explicit [URI](https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax).