[Grok-dev] Re: collective.namedfile + blob

Ethan Jucovy ejucovy at openplans.org
Thu Mar 13 23:32:41 EDT 2008


On Thu, Mar 13, 2008 at 6:51 PM, Martijn Faassen <faassen at startifact.com>
wrote:

> Hey,
>
> On Sun, Mar 9, 2008 at 1:10 PM, Dirceu Pereira Tiegs
> <dirceutiegs at gmail.com> wrote:
> [snip]
> >  I made a branch of megrok.form to add support to blobfile / blobimage,
> >  but without touching collective.namedfile:
> >
> >  http://svn.zope.org/megrok.form/branches/z3c.blobfile_support
> >
> >  ... but it became a mess. :-(
>
> How did it become a mess? Too much custom code?
>
> >  I've also created a branch of collective.namedfile (but doesn't
> >  commited yet) with the same additions, but I don't like the idea of
> >  adding ZODB 3.8 as a dependency of it. There is any way to add a
> >  "conditional dependency" in setup.py? It would be great if we can
> >  install collective.namedfile without z3c.blobfile / ZODB 3.8 dependecy
> >  in Plone and install *with* these dependecies on Grok / Z3.
>
> I don't know of a good way to do this.


Could you achieve this with `extras_require`?  I don't think it's really
much like the intended purpose but it might work;

{{{
setup(name="collective.namedfile",
 ...
 extras_require = {"z3grok": ["z3c.blobfile", "ZODB==3.8"]},
)
}}}

And then I think you would `easy_install collective.namedfile[z3grok]` (or
include "collective.namedfile[z3grok]" in another setup.py's
install_requires) to have those conditional dependencies pulled in.

Ethan Jucovy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/grok-dev/attachments/20080313/2c0b3ec6/attachment-0001.htm


More information about the Grok-dev mailing list