Consequences of optional-dependencies in pyproject.toml #3742
-
From the docs I have this piece of a
I understand that pyproject.toml is independent from a build system. My mindset is to divide between release dependencies and build/development dependencies. The latter for example do include all extra packages that are needed to make unittests; e.g. The example above has two items |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The example is merely illustrative. It shows a hypothetical package that can create documents using either PDF or reStructuredText. These features are considered "optional" (not part of the package's core: maybe the user does not want to generate documents, or maybe the default is generate To install these additional features with pip, one can use: pip install 'my_package[pdf]'
# OR
pip install 'my_package[rest]'
# OR
pip install 'my_package[pdf,rest]' # both Without the |
Beta Was this translation helpful? Give feedback.
The example is merely illustrative. It shows a hypothetical package that can create documents using either PDF or reStructuredText. These features are considered "optional" (not part of the package's core: maybe the user does not want to generate documents, or maybe the default is generate
.txt
documents).To install these additional features with pip, one can use:
Without the
[...]
part the package is installed without the additional features.