[Distutils] Towards a simple and standard sdist format that isn't intertwined with distutils

Chris Barker chris.barker at noaa.gov
Fri Oct 9 20:47:28 CEST 2015


On Fri, Oct 9, 2015 at 10:28 AM, Paul Moore <p.f.moore at gmail.com> wrote:

> ... or thinking again, maybe you mean having multiple packages
> (numpy_mkl, numpy_openblas, ...) all of which satisfy a "numpy"
> requirement?


yes, that is EXACTLY what I meant.

the idea here is that if you build a package that requires both numpy with
a particular BLAS, then you'd do: eg:

numpy|mkl >= 1.9

but if you build one that only required numpy, and doesn't care which BLAS
it's using, then you simply do:

numpy >= 1.9

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.

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.

But is this any different that two packages that depend on two different
specific versions of the same package?

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:

numpy on PyPi would depend on this theoretical py_openblas

any package that depends on only numpy would be easy.

any package that depends on openblas would then depend on py_openblas.

So the question is: if I compile my third party package against numpy and
mkl, it would depend on numpy and py_mkl.

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!

-Chris

-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20151009/676a9e39/attachment.html>


More information about the Distutils-SIG mailing list