On Thu, Mar 13, 2008 at 6:51 PM, Martijn Faassen <<a href="mailto:faassen@startifact.com">faassen@startifact.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hey,<br>
<br>
On Sun, Mar 9, 2008 at 1:10 PM, Dirceu Pereira Tiegs<br>
<<a href="mailto:dirceutiegs@gmail.com">dirceutiegs@gmail.com</a>> wrote:<br>
[snip]<br>
<div class="Ih2E3d">> I made a branch of megrok.form to add support to blobfile / blobimage,<br>
> but without touching collective.namedfile:<br>
><br>
> <a href="http://svn.zope.org/megrok.form/branches/z3c.blobfile_support" target="_blank">http://svn.zope.org/megrok.form/branches/z3c.blobfile_support</a><br>
><br>
> ... but it became a mess. :-(<br>
<br>
</div>How did it become a mess? Too much custom code?<br>
<div class="Ih2E3d"><br>
> I've also created a branch of collective.namedfile (but doesn't<br>
> commited yet) with the same additions, but I don't like the idea of<br>
> adding ZODB 3.8 as a dependency of it. There is any way to add a<br>
> "conditional dependency" in setup.py? It would be great if we can<br>
> install collective.namedfile without z3c.blobfile / ZODB 3.8 dependecy<br>
> in Plone and install *with* these dependecies on Grok / Z3.<br>
<br>
</div>I don't know of a good way to do this.</blockquote><div><br>Could you achieve this with `extras_require`? I don't think it's really much like the intended purpose but it might work;<br><br>{{{<br>setup(name="collective.namedfile",<br>
...<br> extras_require = {"z3grok": ["z3c.blobfile", "ZODB==3.8"]},<br>)<br>}}}<br><br>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.<br>
<br>Ethan Jucovy</div></div>