[Distutils] PEP for dependencies on libraries like BLAS
Donald Stufft
donald at stufft.io
Mon Aug 17 16:15:46 CEST 2015
On August 17, 2015 at 10:08:03 AM, Reinout van Rees (reinout at vanrees.org) wrote:
> Nathaniel Smith schreef op 13-08-15 om 08:08:
> > On Wed, Aug 12, 2015 at 8:10 PM, Robert Collins
> > wrote:
> >> On 13 August 2015 at 12:51, Nathaniel Smith wrote:
> >>> On Aug 12, 2015 16:49, "Robert Collins" wrote:
> >>>
> >>> This doesn't help if you want to declare dependencies on external, system
> >>> managed libraries and have those be automatically somehow provided or
> >>> checked for, but to me that sounds like an impossible boil-the-ocean project
> >>> anyway, while the above is trivial and should just work.
> >> Well, have a read of the draft.
> >>
> >> Its a solved problem by e.g. conda, apt, yum, nix and many others.
> > None of these projects allow a .deb to depend on .rpms etc. -- they
> > all require that they own the whole world
>
> Would it help if our tools could "accept" already-externally installed
> dependencies?
>
> As an example, we use syseggrecipe
> (https://pypi.python.org/pypi/syseggrecipe) in buildout. You specify
> some packages there (psycopg2, numpy, scipy, lxml to name some common
> ones) and syseggrecipe tries to find them and adds them to buildout. So
> IF you installed numpy/scipy as a debian package, you can include it in
> your buildout.
>
> In the same way, if you activated a conda environment with some python
> dependencies, you could tell buildout to re-use one of the packages from
> there.
>
> This works, because buildout doesn't do virtualenv-style hard isolation.
> It "only" inserts the python packages it installed into the front of the
> sys.path. And with syseggrecipe, some system-wide installed eggs are
> explicitly included in sys.path.
>
>
> Question: could pip/virtualenv be made to accept something from the
> outside world? I'm mostly looking at .deb/.rpm packages here. It goes a
> bit against the pure isolation that virtualenv aims to provide, I know :-)
>
> a) pip wouldn't need to own the whole world anymore (in specific cases).
>
> b) you'd probably still want/need a mechanism to find out which .deb
> package you'd need for some system dependency.
>
>
pip already accepts things installs by not pip as long as they have standard Python metadata installed too, which most Linux distributions do. Virtual environments of course isolate you from the system so it isolates you from that too, but that can be disabled by using —system-site-packages.
-----------------
Donald Stufft
PGP: 0x6E3CBCE93372DCFA // 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA
More information about the Distutils-SIG
mailing list