1 |
Bleh, pardon; left out a bit accidentally- |
2 |
|
3 |
On Sun, Feb 18, 2007 at 11:03:33AM -0800, Brian Harring wrote: |
4 |
> On Sun, Feb 18, 2007 at 06:27:59PM +0000, Marius Mauch wrote: |
5 |
> > - for lib in preserve_libs.copy(): |
6 |
> > - old_contents_without_libs = [x for x in old_contents if os.path.basename(x) not in preserve_libs] |
7 |
> > - if len(set(libmap[lib]).intersection(old_contents_without_libs)) == len(libmap[lib]): |
8 |
> > - preserve_libs.remove(lib) |
9 |
> > + def has_external_consumers(lib, contents, otherlibs): |
10 |
> > + consumers = set(libmap[lib]) |
11 |
> |
12 |
> # this should be done *once*. |
13 |
> # further, if libmap where k->set, you'd avoid repeated |
14 |
> # creation of sets all over the damn place. |
15 |
> |
16 |
> > + contents_without_libs = [x for x in contents if not os.path.basename(x) in otherlibs] |
17 |
> |
18 |
> # os.path.basename invocations aren't horribly expensive, but the |
19 |
continual calls to it make the code more verbose then needed (Thus |
20 |
harder to follow), and slower. Consider a mapping instead, see the |
21 |
first review for old_based... |
22 |
|
23 |
~harring |