-
Hello everyone, and hi @frostming, thank you for building this great tool 🙂 I'm super excited by these optional dependencies thing, but I'm not sure I understand how I should use them.
Did I get it right? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 15 replies
-
Yes, you are correct. If you have some general dev-only libraries, put them in |
Beta Was this translation helpful? Give feedback.
-
My understanding of extra packages always was that the package I'm installing could do additional (extra) things if the extra packages are installed (e.g. support a numpy interface if numpy is installed). On the other hand, development packages do not enable additional functionality for the user of a package, but are required for development (testing, deploying, etc.) on the package. For the potential user of a package (who cares about upstream dependencies) this is a fundamental difference and might influence her/his decision to install and use a certain package. Libraries.io currently shows all these development packages as extras which they are not according to my definition. IMHO, it would make a lot of sense to not have development packages in the "project.optional-dependencies". Is it possible to have sections (which make a lot of sense) in the dev-dependencies like we have it now in the "project.optional-dependencies"? |
Beta Was this translation helpful? Give feedback.
-
Hey folks, I have made a PR #351 to support dev-dependencies groups. I have tried to make the change backward-compatible, but still needs more testing. I appreciate if you would like to help with this. @pawamoy @pohlt |
Beta Was this translation helpful? Give feedback.
Yes, you are correct.
dev-dependencies
work like the same field inPipfile
or Poetry, it is an addition to the PEP 621 and won't appear in the converted metadata shipped with distributions. Whileoptional-dependencies
is a standard PEP 621 field and acts likeextras_require
insetup.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.