[Grok-dev] Re: Salt & z3c.autoinclude

Martijn Faassen faassen at startifact.com
Fri Mar 21 11:47:41 EDT 2008


Good work! Some comments.

Ethan Jucovy wrote:
> but the entry points look a bit different.  Instead of
> [z3c.plugin]
> target = plone
> it looks like
> [z3c.autoinclude.plugin]
> plone = myplugin.package
> As I understand entry points, this is necessary, because an entry point 
> does not contain any information about the package that provided it (so 
> you need to spell it out explicitly somewhere) and because the 
> right-hand side of the entry point is supposed to refer to an importable 
> python object.

My understanding of entry points is limited, but I'm reading up on it now.

I don't see that you should have to spell out the dotted name of the 
plugin package though: I see entry points contain a 'dist' attribute. 
Couldn't you use this information?

The right hand side needing something importable seems like a more 
troublesome problem. Then again, a plugin to an application will almost 
certainly have a dependency on that package, so a plugin for Plone will 
depend on Plone and import things from it. This means we could do the 

target = package.plugged.into

For plone (if it's in 'plone.app'):

target = plone.app

(note that I think 'target' is a better name than 'basepackage').



More information about the Grok-dev mailing list