Mercurial > repos > guerler > hhblits
comparison lib/python3.8/site-packages/setuptools/dep_util.py @ 0:9e54283cc701 draft
"planemo upload commit d12c32a45bcd441307e632fca6d9af7d60289d44"
author | guerler |
---|---|
date | Mon, 27 Jul 2020 03:47:31 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:9e54283cc701 |
---|---|
1 from distutils.dep_util import newer_group | |
2 | |
3 | |
4 # yes, this is was almost entirely copy-pasted from | |
5 # 'newer_pairwise()', this is just another convenience | |
6 # function. | |
7 def newer_pairwise_group(sources_groups, targets): | |
8 """Walk both arguments in parallel, testing if each source group is newer | |
9 than its corresponding target. Returns a pair of lists (sources_groups, | |
10 targets) where sources is newer than target, according to the semantics | |
11 of 'newer_group()'. | |
12 """ | |
13 if len(sources_groups) != len(targets): | |
14 raise ValueError( | |
15 "'sources_group' and 'targets' must be the same length") | |
16 | |
17 # build a pair of lists (sources_groups, targets) where source is newer | |
18 n_sources = [] | |
19 n_targets = [] | |
20 for i in range(len(sources_groups)): | |
21 if newer_group(sources_groups[i], targets[i]): | |
22 n_sources.append(sources_groups[i]) | |
23 n_targets.append(targets[i]) | |
24 | |
25 return n_sources, n_targets |