<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 9, 2015 at 10:28 AM, Paul Moore <span dir="ltr"><<a href="mailto:p.f.moore@gmail.com" target="_blank">p.f.moore@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">... or thinking again, maybe you mean having multiple packages<br>
(numpy_mkl, numpy_openblas, ...) all of which satisfy a "numpy"<br>
requirement?</blockquote><div><br></div><div>yes, that is EXACTLY what I meant.</div><div><br></div><div>the idea here is that if you build a package that requires both numpy with a particular BLAS, then you'd do: eg:</div><div><br></div><div>numpy|mkl >= 1.9</div><div><br></div><div>but if you build one that only required numpy, and doesn't care which BLAS it's using, then you simply do:</div><div><br></div><div>numpy >= 1.9</div><div><br></div><div>So pip, when asked to install said package, would look and see if any package called numpy|* was installed (the ther right version). if so, it would move along. If not, then it would go look on PyPi for "numpy" -- and this is where it gets tricky -- which numpy| should it use? At this stage, it wouldn't matter, anyone would do.</div><div><br></div><div>But say it installed numpy|mkl. Then next the user goes to install a package that depends on numpy|openblas -- now pip goes and looks, and  find numpy|mkl, but not numpy|openblas -- so it need to go install numpy|openblas. which overwrites numpy|mkl, which is still OK. Until the user goes to install somethign that DOES depend on numpy|mkl. No we are stuck.</div><div><br></div><div>But is this any different that two packages that depend on two different specific versions of the same package?</div><div><br></div><div>But all this is making me think that the way this could be handled is by numpy NOT building a BLAS into the package at all. But rather, having the package depend on another package that provides the BLAS, so:</div><div><br></div><div>numpy on PyPi would depend on this theoretical py_openblas</div><div><br></div><div>any package that depends on only numpy would be easy.</div><div><br></div><div>any package that depends on openblas would then depend on py_openblas.</div><div><br></div><div>So the question is: if I compile my third party package against numpy and mkl, it would depend on numpy and py_mkl.</div><div><br></div><div>If I went to installed this on a system that had a numpy that depends on openblas, pip would install py_mkl (having already installed numpy and py_openblas). And I'd have a numpy extension calling into a different BLAS than numpy itself is calling into -- would that cause any problems? Python would be linked to two libs with the same names -- would that cause conflict? I'm way out of my depth here!</div><div><br></div><div>-Chris</div><div><br></div><div>-- <br></div></div><div class="gmail_signature"><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br><br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a></div>
</div></div>