Install for production
See original GitHub issueIs your feature request related to a problem? Please describe.
Most dependency managers have a --production
(or similar) flag to only install for production. A normal install
without that flag install all dependencies (production + development).
Looking at https://pdm.fming.dev/usage/dependency/#install-the-packages-pinned-in-lock-file this is confusing.
Describe the solution you’d like
I would like it to mimic how other tools does this and believe this tool incorrectly took the approach of pipenv. See https://github.com/pypa/pipenv/issues/3093#issuecomment-432718562 for more reference of tools (the entire thread is interesting).
The reason is that developers are bound to want to install all (production + dev) dependencies in their daily work. A pdm install
is thus quicker to write. It also mimics most (all?) other package managers out there.
Issue Analytics
- State:
- Created 2 years ago
- Comments:22 (5 by maintainers)
Top GitHub Comments
In fact, it is likely that I would switch to CalVer at some point 🤣 https://hynek.me/articles/semver-will-not-save-you/
Seeing these, I feel like if we go for a
--production
flag, the-d
flag should be removed. Sections should have different names between prod groups and dev groups, allowing-s
to match prod groups and/or dev groups.Lets shorten
--production
to-p
in this example. This would give us this:Additionally there’s the
--no-default
flag that could be used in the first 4 cases to prevent installing the prod deps (those that are not optional), useful in CI.