diff options
author | John Estabrook <jestabro@vyos.io> | 2021-08-19 11:41:00 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2021-08-19 14:31:48 -0500 |
commit | 9ac5e1c8479049ae63747db36f4a0ef13ce6bc01 (patch) | |
tree | df191b7ef40f9287b9436a0bdb7bae857ff90304 | |
parent | 3866ada47728b2845d82b93a3e78d9229ba07999 (diff) | |
download | vyos-1x-9ac5e1c8479049ae63747db36f4a0ef13ce6bc01.tar.gz vyos-1x-9ac5e1c8479049ae63747db36f4a0ef13ce6bc01.zip |
Revert "xml: T1962: Add script to process syntaxVersion tags during build"
This reverts commit 0ecc2c26f7ac939e4e23c14f5027ac7592c25761.
-rw-r--r-- | Makefile | 7 | ||||
-rwxr-xr-x | scripts/build-component-versions | 47 |
2 files changed, 1 insertions, 53 deletions
@@ -63,11 +63,6 @@ op_mode_definitions: $(op_xml_obj) # could mask help strings or mandatory priority statements #find $(OP_TMPL_DIR) -name node.def -type f -empty -exec false {} + || sh -c 'echo "There are empty node.def files! Check your interface definitions." && exit 1' -.PHONY: component_versions -.ONESHELL: -component_versions: interface_definitions - $(CURDIR)/scripts/build-component-versions $(BUILD_DIR)/interface-definitions $(DATA_DIR) - .PHONY: vyshim vyshim: $(MAKE) -C $(SHIM_DIR) @@ -77,7 +72,7 @@ vyxdp: $(MAKE) -C $(XDP_DIR) .PHONY: all -all: clean interface_definitions op_mode_definitions component_versions vyshim +all: clean interface_definitions op_mode_definitions vyshim .PHONY: clean clean: diff --git a/scripts/build-component-versions b/scripts/build-component-versions deleted file mode 100755 index 5362dbdd4..000000000 --- a/scripts/build-component-versions +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env python3 - -import sys -import os -import argparse -import json - -from lxml import etree as ET - -parser = argparse.ArgumentParser() -parser.add_argument('INPUT_DIR', type=str, - help="Directory containing XML interface definition files") -parser.add_argument('OUTPUT_DIR', type=str, - help="Output directory for JSON file") - -args = parser.parse_args() - -input_dir = args.INPUT_DIR -output_dir = args.OUTPUT_DIR - -version_dict = {} - -for filename in os.listdir(input_dir): - filepath = os.path.join(input_dir, filename) - print(filepath) - try: - xml = ET.parse(filepath) - except Exception as e: - print("Failed to load interface definition file {0}".format(filename)) - print(e) - sys.exit(1) - - root = xml.getroot() - version_data = root.iterfind("syntaxVersion") - for ver in version_data: - component = ver.get("component") - version = int(ver.get("version")) - - v = version_dict.get(component) - if v is None: - version_dict[component] = version - elif version > v: - version_dict[component] = version - -out_file = os.path.join(output_dir, 'component-versions.json') -with open(out_file, 'w') as f: - json.dump(version_dict, f, indent=4, sort_keys=True) |