Mercurial > hg > graal-jvmci-8
diff mxtool/mx.py @ 15638:83c69954bbaa
mxtool: distribution dependency should be a list
author | Bernhard Urban <bernhard.urban@jku.at> |
---|---|
date | Wed, 14 May 2014 11:19:38 +0200 |
parents | 4aeb0b80324f |
children | 50fbda571d99 |
line wrap: on
line diff
--- a/mxtool/mx.py Wed May 14 11:08:05 2014 +0200 +++ b/mxtool/mx.py Wed May 14 11:19:38 2014 +0200 @@ -62,7 +62,7 @@ A distribution is a jar or zip file containing the output from one or more Java projects. """ class Distribution: - def __init__(self, suite, name, path, sourcesPath, deps, excludedDependencies, distDependency): + def __init__(self, suite, name, path, sourcesPath, deps, excludedDependencies, distDependencies): self.suite = suite self.name = name self.path = path.replace('/', os.sep) @@ -71,7 +71,7 @@ self.deps = deps self.update_listeners = set() self.excludedDependencies = excludedDependencies - self.distDependency = distDependency + self.distDependencies = distDependencies def sorted_deps(self, includeLibs=False): try: @@ -126,8 +126,14 @@ else: p = dep - if self.distDependency and p in _dists[self.distDependency].sorted_deps(): - logv("Excluding {0} from {1} because it's provided by the dependency {2}".format(p.name, self.path, self.distDependency)) + isCoveredByDependecy = False + for d in self.distDependencies: + if p in _dists[d].sorted_deps(): + logv("Excluding {0} from {1} because it's provided by the dependency {2}".format(p.name, self.path, d)) + isCoveredByDependecy = True + break + + if isCoveredByDependecy: continue # skip a Java project if its Java compliance level is "higher" than the configured JDK @@ -755,8 +761,8 @@ sourcesPath = attrs.pop('sourcesPath', None) deps = pop_list(attrs, 'dependencies') exclDeps = pop_list(attrs, 'exclude') - distDep = attrs.pop('distDependency', None) - d = Distribution(self, name, path, sourcesPath, deps, exclDeps, distDep) + distDeps = pop_list(attrs, 'distDependencies') + d = Distribution(self, name, path, sourcesPath, deps, exclDeps, distDeps) d.__dict__.update(attrs) self.dists.append(d)