[Distutils] PEP for dependencies on libraries like BLAS

Reinout van Rees reinout at vanrees.org
Mon Aug 17 16:07:17 CEST 2015


Nathaniel Smith schreef op 13-08-15 om 08:08:
> On Wed, Aug 12, 2015 at 8:10 PM, Robert Collins
> <robertc at robertcollins.net> wrote:
>> On 13 August 2015 at 12:51, Nathaniel Smith <njs at pobox.com> wrote:
>>> On Aug 12, 2015 16:49, "Robert Collins" <robertc at robertcollins.net> 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.


Reinout

-- 
Reinout van Rees                          http://reinout.vanrees.org/
reinout at vanrees.org                   http://www.nelen-schuurmans.nl/
"Learning history by destroying artifacts is a time-honored atrocity"




More information about the Distutils-SIG mailing list