[Distutils] Adding entry points into Distutils ?
floris.bruynooghe at gmail.com
Tue May 5 22:27:49 CEST 2009
On Tue, May 05, 2009 at 05:05:28PM +0200, Tarek Ziadé wrote:
> On Tue, May 5, 2009 at 4:29 PM, Doug Hellmann <doug.hellmann at gmail.com> wrote
> >> a configuration file that reunites all entry points an application
> >> uses. For the Atomisator example:
> >> [atomisator.reader]
> >> rss = somepackage.somemodule:MyPluginClass
> >> And this would fit I think in Distutils needs since we can configure
> >> it through three levels of configuration files
> >> distutils.cfg, pydistutils.cfg and setup.cfg
> > That sounds good.
So there would be a configuration file for each application that needs
it? I like this a lot more then the global entry-point registry too
(it avoids name collisions for entry points too).
But how can a "python setup.py install" know where to find this
configuration file to add it's plugin? Or should this be an explicit
manual step? It might be nice to have a --register-plugins option to
the install command though if possible. Something else to keep into
account is the FHS, I can imagine GNU/Linux distributions would want
to place a configuration file somewhere else, like in
/etc/PROJECT.conf instead of
(pathnames are fairly random examples). The only thing I can think of
is somehow having a file in .egg-info telling you where the plugin
configuration file is, just like was proposed for all types of data
files earlier on this list. But I think by now I'm taking this too
far and the install command of distutils should not be able to
register plugins for random projects automatically.
Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org
More information about the Distutils-SIG