aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/buildgen
diff options
context:
space:
mode:
Diffstat (limited to 'tools/buildgen')
-rwxr-xr-xtools/buildgen/plugins/expand_version.py15
-rw-r--r--tools/buildgen/plugins/transitive_dependencies.py13
2 files changed, 13 insertions, 15 deletions
diff --git a/tools/buildgen/plugins/expand_version.py b/tools/buildgen/plugins/expand_version.py
index d602e3421b..d8a3600b7c 100755
--- a/tools/buildgen/plugins/expand_version.py
+++ b/tools/buildgen/plugins/expand_version.py
@@ -23,14 +23,13 @@ a custom version string for each language's package.
import re
LANGUAGES = [
- 'core',
- 'cpp',
- 'csharp',
- 'node',
- 'objc',
+ 'core',
+ 'cpp',
+ 'csharp',
+ 'objc',
'php',
- 'python',
- 'ruby',
+ 'python',
+ 'ruby',
]
class Version:
@@ -84,7 +83,7 @@ class Version:
def php_composer(self):
"""Version string for PHP Composer package"""
return '%d.%d.%d' % (self.major, self.minor, self.patch)
-
+
def mako_plugin(dictionary):
"""Expand version numbers:
- for each language, ensure there's a language_version tag in
diff --git a/tools/buildgen/plugins/transitive_dependencies.py b/tools/buildgen/plugins/transitive_dependencies.py
index 5f37ed13a1..bf5263e685 100644
--- a/tools/buildgen/plugins/transitive_dependencies.py
+++ b/tools/buildgen/plugins/transitive_dependencies.py
@@ -38,17 +38,16 @@ def transitive_deps(lib, libs):
def mako_plugin(dictionary):
"""The exported plugin code for transitive_dependencies.
- Each item in libs, node_modules, and targets can have a deps list.
- We add a transitive_deps property to each with the transitive closure
- of those dependency lists.
+ Iterate over each list and check each item for a deps list. We add a
+ transitive_deps property to each with the transitive closure of those
+ dependency lists.
"""
libs = dictionary.get('libs')
- node_modules = dictionary.get('node_modules')
- targets = dictionary.get('targets')
- for target_list in (libs, targets, node_modules):
+ for target_name, target_list in dictionary.items():
for target in target_list:
- target['transitive_deps'] = transitive_deps(target, libs)
+ if isinstance(target, dict) and 'deps' in target:
+ target['transitive_deps'] = transitive_deps(target, libs)
python_dependencies = dictionary.get('python_dependencies')
python_dependencies['transitive_deps'] = (