diff options
author | Thibault Saunier <tsaunier@igalia.com> | 2018-11-11 20:06:04 -0300 |
---|---|---|
committer | Thibault Saunier <tsaunier@igalia.com> | 2019-05-13 11:42:15 -0400 |
commit | fbb81c6c78e098550687fd3758e9a6e515c5e00e (patch) | |
tree | b33a4f2584089d13df80148aba5c40b1b72f270f /scripts | |
parent | 3d24de2f2477dca3608ee14c66230c913290f114 (diff) | |
download | gstreamer-fbb81c6c78e098550687fd3758e9a6e515c5e00e.tar.gz |
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.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/generate_plugins_path.py | 19 |
1 files changed, 19 insertions, 0 deletions
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) |