<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, 27 Oct 2015 at 02:17 Robert Collins <<a href="mailto:robertc@robertcollins.net">robertc@robertcollins.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 27 October 2015 at 21:47, David Cournapeau <<a href="mailto:cournape@gmail.com" target="_blank">cournape@gmail.com</a>> wrote:<br>
<br>
> Another simple solution for this particular case is to add conflict rules<br>
> between packages that provide the same requirement (that's what php's<br>
> composer do IIRC).<br>
><br>
> The case of safety against malicious forks is handled quite explicitly in<br>
> composer, we may want to look at how they do it when considering solutions<br>
> (e.g. <a href="https://github.com/composer/composer/issues/2690" rel="noreferrer" target="_blank">https://github.com/composer/composer/issues/2690</a>, though it has<br>
> changed a bit since then)<br>
><br>
> Adding the provides/conflict concepts to pip resolver will complexify it<br>
> quite significantly, both in terms of running time complexity (since at that<br>
> point you are solving a NP-complete problem) and in terms of implementation.<br>
> But we also know for real cases this is doable, even in pure python<br>
> (composer handles all the cases you are mentioning, and is in pure php).<br>
<br>
We already require a full NP-complete solver because of <, <= and ~<br>
version operators.<br>
<br>
I haven't adsorbed this proposal enough to comment on the reification<br>
aspect yet.<br>
<br>
I'm worried about provides and conflicts in general, but not from a<br>
resolver code perspective - thats a one-ish-time-cost, but instead<br>
from a user experience perspective.<br></blockquote><div><br></div><div>So from my perspective as someone who (I think) grasps what the problems that everyone is trying to solve is but not knowing enough to know how stuff is done now (all my projects on PyPI are pure Python), Nathaniel's proposal makes total sense to me.</div><div><br></div><div>I would think it would be easy to explain to a scientist that "to get scipy, run `python3.5 -m pip install numpy`, but if you want fast over open source and use Intel's MKL library, do `python3.5 -m pip install numpy[mkl]`. I think the syntax clearly shows it's a modification/tweak/special version of numpy and it makes sense that I want to install something that provides numpy while relying on MKL.</div><div><br></div><div>Nathaniel's comment about how this might actually give pip a leg up on conda also sounds nice to me as I have enough worry about having a fissure in 1D along the Python 2/3 line, and I'm constantly worried that the scientific community is going to riot and make it a 2D fissure along Python 2/3, pip/conda axes and split effort, documentation, etc.</div></div></div>