<p dir="ltr"><br>
On 5 Mar 2013 06:55, "PJ Eby" <<a href="mailto:pje@telecommunity.com">pje@telecommunity.com</a>> wrote:<br>
><br>
> On Mon, Mar 4, 2013 at 2:41 PM, Paul Moore <<a href="mailto:p.f.moore@gmail.com">p.f.moore@gmail.com</a>> wrote:<br>
> > In thinking about how virtualenv would describe the packages it wants<br>
> > to preload in PEP 426 metadata form, it occurred to me that there are<br>
> > scenarios with setuptools and distribute where it's not obvious how to<br>
> > state the requirement you want. Specifically, if you want to install<br>
> > setuptools if it is present, but if not fall back to distribute (for<br>
> > example, if you have a local package repository and no access to PyPI,<br>
> > but setuptools may or may not be present).<br>
> ><br>
> > I appreciate this is a fairly obscure case. It comes up with<br>
> > virtualenv because virtualenv uses locally-available distributions by<br>
> > default, only going to PyPI if it has to. So in that case (depending<br>
> > on user options) I could genuinely want to pick whichever of<br>
> > setuptools or distribute is present, and I don't care which, as it<br>
> > saves a network lookup.<br>
> ><br>
> > I'm actually using the distlib locator API, not the PEP 426 fields<br>
> > themselves, but (a) distlib locators use the same syntax, as far as<br>
> > I'm aware, and (b) I think the Requires-Dist syntax makes a good<br>
> > language for specifying distribution requirements in any context, so<br>
> > I'd hate to end up with 2 slightly-different forms.<br>
> ><br>
> > If the answer is that the spec doesn't support that, then fine. I'll<br>
> > have to manually code for it. But I'd hate to write code I didn't need<br>
> > to :-)<br>
><br>
> This is a good point; people have been wanting setuptools to support<br>
> alternate dependencies (i.e., I need this *or* that) for a long time,<br>
> and not just for that particular use case.</p>
<p dir="ltr">PEP 426 has another similar-but-not-identical problem: the current version doesn't have a particularly clean way to write "2.6+ or 3.2+" for the Requires-Python field.</p>
<p dir="ltr">Cheers,<br>
Nick.</p>
<p dir="ltr">> _______________________________________________<br>
> Distutils-SIG maillist  -  <a href="mailto:Distutils-SIG@python.org">Distutils-SIG@python.org</a><br>
> <a href="http://mail.python.org/mailman/listinfo/distutils-sig">http://mail.python.org/mailman/listinfo/distutils-sig</a><br>
</p>