pdm-backend icon indicating copy to clipboard operation
pdm-backend copied to clipboard

Modular packages

Open jykae opened this issue 1 year ago • 2 comments

Is it possible to define "extras" with dependencies + source files includes?

Looking for build tool that would make modular package possible for internal tools package, would minimize the maintenance if would be possible to do layered package with minimal defaults and then build extra layers with dependencies & source includes.

And if not possible, would you be interested to implement such feature for PDM ?

jykae avatar Nov 09 '23 07:11 jykae

I'm not sure to completely understand what you are trying to do. Could you elaborate your use-case a bit, with examples? What do you mean by "layered package with minimal defaults", and "build extra layers with dependencies and source includes"? Can you show what inputs you have and what outputs you would expect, in terms of files/metadata/distributions?

Also, I suspect pdm-backend will only support standards, so if what you're trying to do is not standard, there are few chances support for it will be added to pdm-backend.

pawamoy avatar Nov 09 '23 11:11 pawamoy

Not sure if this is exactly your use case, but you can write a backend plugin: https://backend.pdm-project.org/hooks/#distribute-the-hook-as-a-plugin

We have created https://github.com/pdm-project/pdm-build-locked to add extras to project metadata on build. The plugin has been transferred to the PDM org and will be turned into a backend plugin soon, which should further enhance its usability

sigma67 avatar Dec 05 '23 12:12 sigma67