[Distutils] pkgfile entry points

James Casbon casbon at gmail.com
Tue Aug 22 09:57:40 CEST 2006


Hi,

I have an app which makes heavy use of rich ini style configuration files. I
would like to add the ability to extend it using pkg_resources entry
points.  It seems quite natural here to use the entry point to refer to the
plugin configuration data like so:

[myapp.extension]
something = pkgfile:extension/config.ini

This single point would allow me to get the config data for the plugin.
Now, at the moment this style of entry point is not supported.  I could
potentially get round this by asking all plugins to define an entry point
method that returns the location of the configuration file, but that just
creates another piece of tedious boilerplate to write.

So, I'm wondering whether the inability to supply pkgfiles as entry points
is a deliberate design decision or just something that hadn't been
anticipated?  You might suggest that the configuration should be done as
entry points.  However, the ini file structure used is more rich than
supported by entry points and to use them would require moving lots of
configuration data into python code.  I do therefore think that this is a
legitimate use.

thanks,
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/distutils-sig/attachments/20060822/b1618f69/attachment.htm 


More information about the Distutils-SIG mailing list