From fbb81c6c78e098550687fd3758e9a6e515c5e00e Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Sun, 11 Nov 2018 20:06:04 -0300 Subject: Generate the GST_PLUGIN_PATH using the `plugins` variable in subprojects To build the documentation, we are maintaining a 'standardise' `plugins` variable accross all modules to list all plugins and generate documentation for them. This is also used to get the right plugin path when inspecting plugins for the documentation. --- scripts/generate_plugins_path.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 scripts/generate_plugins_path.py (limited to 'scripts') diff --git a/scripts/generate_plugins_path.py b/scripts/generate_plugins_path.py new file mode 100644 index 0000000000..89288244c3 --- /dev/null +++ b/scripts/generate_plugins_path.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 + +import argparse +import os +import json + +if __name__ == "__main__": + parser = argparse.ArgumentParser() + parser.add_argument("--builddir", help="The meson build directory") + parser.add_argument(dest="plugins", help="The list of plugins", nargs="+") + + options = parser.parse_args() + + all_paths = set() + for plugin in options.plugins: + all_paths.add(os.path.dirname(plugin)) + + with open(os.path.join(options.builddir, 'GstPluginsPath.json'), "w") as f: + json.dump(list(all_paths), f, indent=4, sort_keys=True) -- cgit v1.2.1