[Distutils] command hooks...
Erik Bray
erik.m.bray at gmail.com
Fri May 25 22:23:09 CEST 2012
On Fri, May 25, 2012 at 2:24 PM, Daniel Holth <dholth at gmail.com> wrote:
> This discussion is confusing because we are either talking about a
> general plugin discovery mechanism for Python, or a plugin mechanism
> that packaging itself uses.
>
> After the patch, entry_points.txt (which you are encouraged to write
> yourself) is copied by means of a new {dist-info} category using the
> resources = mechanism in packaging. This is a straightforward way to
> copy anything into the .dist-info directory. Apart from copying the
> file, 'packaging' has no role.
>
> setup.cfg:
>
> [files]
> packages = mypackage
> resources =
> entry_points.txt={dist-info}
>
> That's all there is to it.
Neat! I didn't realize there was a {dist-info} resource category.
That, plus the register_finder() approach mentioned in the other
thread could be a way to go for interoperability with packages using
setuptools. It would still require a bit of hackery though... I
suspect there would be resistance to adding support for this directly
in packaging. But a setup_hook could set this up.
Erik
More information about the Distutils-SIG
mailing list