diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2021-08-23 22:08:49 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2021-08-23 22:09:41 +0100 |
commit | 77770fc807d47cfcf3de28635d4c96b3fc35180c (patch) | |
tree | 9cd29ed06ebac38805ce37ae2002b7ec61c36f29 /build-aux | |
parent | 53a7153d7d01669c9a92688e900bab9ab9255af2 (diff) | |
download | json-glib-77770fc807d47cfcf3de28635d4c96b3fc35180c.tar.gz |
build: Add the API reference to the dist archive
We can use a dist script to include the generated documentation into the
dist archive, as well as including gi-docgen.
Diffstat (limited to 'build-aux')
-rw-r--r-- | build-aux/dist-docs.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/build-aux/dist-docs.py b/build-aux/dist-docs.py new file mode 100644 index 0000000..7bd71c6 --- /dev/null +++ b/build-aux/dist-docs.py @@ -0,0 +1,22 @@ +#!/usr/bin/env python3 + +import os +import shutil +import subprocess + +from pathlib import PurePath + + +references = [ + 'docs/json-glib/json-glib-1.0', +] + +sourceroot = os.environ.get('MESON_SOURCE_ROOT') +buildroot = os.environ.get('MESON_BUILD_ROOT') +distroot = os.environ.get('MESON_DIST_ROOT') + +for reference in references: + src_path = os.path.join(buildroot, reference) + if os.path.isdir(src_path): + dst_path = os.path.join(distroot, reference) + shutil.copytree(src_path, dst_path) |