Hi,
when I include an egg with extras (like gocept.foo[server]) the dependencies from the extra are not automatically included with autoinclude.
I'm posting this here, because there is no other obvious place (no project for this on lauchpad).
Regards,
Hey,
Christian Zagrodnick wrote:
when I include an egg with extras (like gocept.foo[server]) the dependencies from the extra are not automatically included with autoinclude.
I'm posting this here, because there is no other obvious place (no project for this on lauchpad).
I only see this now. :)
I don't know much to say about this, except that patches are welcome to enable extras support.
Regards,
Martijn
Hey Christian,
I finally had a bit of time to sort out my Zope.org SVN credentials and try to look into this ... but I'm actually not getting very far.
What I'm stumped on: is there any way to find out which "extras" have been installed with a package?
The details: The bad line is src/z3c/autoinclude/dependency.py#L22:
for req in self.context.requires():
(Here self.context is a distribution object, that of the module that wants to <includeDependencies>. We're about to look for ZCML files in the packages of its dependencies.)
The pkg_resources documentation (http://peak.telecommunity.com/DevCenter/PkgResources#distribution-objects) explains:
requires(extras=()) List the Requirement objects that specify this distribution's dependencies. If extras is specified, it should be a sequence of names of "extras" defined by the distribution, and the list returned will then include any dependencies needed to support the named "extras".
So in other words, L22 should look like: + for req in self.context.requires(extras=list_of_actively_installed_extras_for_the_distribution):
The problem is, I can't figure out how to figure out which extras are actively installed. (We don't want to pass in *all* of the distribution's extras, because that might include *uninstalled* extras -- which would mean we end up trying to include ZCML from packages that we should not be, and that might not even be installed.)
Thanks, Ethan
On Tue, Nov 11, 2008 at 2:58 AM, Christian Zagrodnick cz@gocept.com wrote:
Hi,
when I include an egg with extras (like gocept.foo[server]) the dependencies from the extra are not automatically included with autoinclude.
I'm posting this here, because there is no other obvious place (no project for this on lauchpad).
Regards,
Christian Zagrodnick · cz@gocept.com gocept gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · germany http://gocept.com · tel +49 345 1229889 4 · fax +49 345 1229889 1 Zope and Plone consulting and development
Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )