Skip to content

Difference between dev-dependencies and optional-dependencies? #304

Answered by frostming
pawamoy asked this question in Q&A
Discussion options

pawamoy
Mar 14, 2021
Maintainer Sponsor

You must be logged in to vote

Yes, you are correct. dev-dependencies work like the same field in Pipfile or Poetry, it is an addition to the PEP 621 and won't appear in the converted metadata shipped with distributions. While optional-dependencies is a standard PEP 621 field and acts like extras_require in setup.py.

If you have some general dev-only libraries, put them in dev-dependencies, otherwise if would like some tools and libraries to be installed only under certain scenarios, optional-dependencies is a good place to go.

Replies: 3 comments 15 replies

Comment options

You must be logged in to vote
3 replies
@pawamoy
Comment options

pawamoy Mar 15, 2021
Maintainer Author Sponsor

@frostming
Comment options

@pawamoy
Comment options

pawamoy Mar 15, 2021
Maintainer Author Sponsor

Answer selected by pawamoy
Comment options

You must be logged in to vote
4 replies
@frostming
Comment options

@pawamoy
Comment options

pawamoy Mar 19, 2021
Maintainer Author Sponsor

@frostming
Comment options

@pohlt
Comment options

Comment options

You must be logged in to vote
8 replies
@pawamoy
Comment options

pawamoy Apr 3, 2021
Maintainer Author Sponsor

@pawamoy
Comment options

pawamoy Apr 3, 2021
Maintainer Author Sponsor

@frostming
Comment options

@pawamoy
Comment options

pawamoy Apr 3, 2021
Maintainer Author Sponsor

@pawamoy
Comment options

pawamoy Apr 3, 2021
Maintainer Author Sponsor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants