-
-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow exclusion of dependencies #1316
Comments
That would be nice indeed. I think Python devs have been wanting a "dependency opt-out" mecanism for a long time. One thing though is that you have to make sure the package you're using does not import all its submodules, otherwise you'll get an import error anyway, so excluding deps would probably not work for many packages. |
Bump Though I'd make the field |
Fixes #1316 Signed-off-by: Frost Ming <[email protected]>
how to exclude on pdm build command? [tool.pdm.resolution] |
In short, you can't. PDM doesn't have control on the core-metadata contained in the build artifact. You'll need |
Is your feature request related to a problem? Please describe.
We have the problem that some python libraries have a lot of dependencies that are actually optional but not marked as such and come with the regular installation.
For example RASA which is a cool library for intent detection but they simply added all dependencies as main dependencies
https://github.com/RasaHQ/rasa/blob/main/pyproject.toml#L65
This means when I install this I get besides the actual core libraries dependencies to e.g. a telegram client lib or a mongodb library
This does not only increase the size of your final application but also introduces potential security or licenses alerts
Describe the solution you'd like
It would be great if there would be similar to the
[tool.pdm.overrides]
feature a[tool.pdm.excludes]
section where I can exclude certain dependenciesWould be great if this would not only allowing blacklisting that dependency but also then prevents the resolution of the dependency of this depenency if they are not required by other dependencies
e.g.:
The text was updated successfully, but these errors were encountered: