4 One day, when this module grows up, it might actually try to fix things.
5 'apt-cache search | apt-get install' ... or a less terrifying version of
6 the same. With added distro-independant pixie dust.
10 # this could use '/usr/bin/which', I suppose. But this seems simpler
11 for dir in os
.environ
['PATH'].split(':'):
12 file = os
.path
.join(dir, cmd
)
13 if os
.path
.exists(file):
15 raise ValueError('Missing command: %s' % cmd
)
21 results
.append(command(cmd
))
25 lddirs
= [x
.rstrip() for x
in open('/etc/ld.so.conf', 'r').readlines()]
26 for dir in ['/lib', '/usr/lib'] + lddirs
:
27 file = os
.path
.join(dir, lib
)
28 if os
.path
.exists(file):
30 raise ValueError('Missing library: %s' % lib
)
36 results
.append(library(lib
))