about summary refs log tree commit diff
path: root/doc/languages-frameworks
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2022-05-22 16:27:48 +0200
committerMartin Weinelt <hexa@darmstadt.ccc.de>2022-05-22 16:31:45 +0200
commit809ffd6cd33b0020c6ac0be57bf25f3da4c17d31 (patch)
tree38dde501b316412e514c3a7c75fd944496c5b1c0 /doc/languages-frameworks
parent394687bf39bb3b166759853d8b257997483415eb (diff)
doc/python: use optional-dependencies instead of extras-require
This is the term that PEP 621 uses and it is less likely to be
misspelled.

https://peps.python.org/pep-0621/#dependencies-optional-dependencies

I was never sure if it was `extra` or `extras`, or `require` or
`requires` and finally committed a mistake in #167405.
Diffstat (limited to 'doc/languages-frameworks')
-rw-r--r--doc/languages-frameworks/python.section.md7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/languages-frameworks/python.section.md b/doc/languages-frameworks/python.section.md
index fe28f94c069d3..9cb9d2ba7bfd7 100644
--- a/doc/languages-frameworks/python.section.md
+++ b/doc/languages-frameworks/python.section.md
@@ -982,12 +982,13 @@ in python.withPackages(ps: [ps.blaze])).env
 #### Optional extra dependencies
 
 Some packages define optional dependencies for additional features. With
-`setuptools` this is called `extras_require` and `flit` calls it `extras-require`. A
+`setuptools` this is called `extras_require` and `flit` calls it
+`extras-require`, while PEP 621 calls these `optional-dependencies`. A
 method for supporting this is by declaring the extras of a package in its
 `passthru`, e.g. in case of the package `dask`
 
 ```nix
-passthru.extras-require = {
+passthru.optional-dependencies = {
   complete = [ distributed ];
 };
 ```
@@ -997,7 +998,7 @@ and letting the package requiring the extra add the list to its dependencies
 ```nix
 propagatedBuildInputs = [
   ...
-] ++ dask.extras-require.complete;
+] ++ dask.optional-dependencies.complete;
 ```
 
 Note this method is preferred over adding parameters to builders, as that can