comparison env/lib/python3.9/site-packages/setuptools/dep_util.py @ 0:4f3585e2f14b draft default tip

"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author shellac
date Mon, 22 Mar 2021 18:12:50 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4f3585e2f14b
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