Skip to content
Snippets Groups Projects
post_install.py 597 B
Newer Older
#!/usr/bin/env python3

# SPDX-FileCopyrightText: 2017 Carlos Sanchez <csoriano@gnome.org>
# SPDX-FileCopyrightText: 2020 Bruce Cowan <bruce@bcowan.me.uk>
#
# SPDX-License-Identifier: CC0-1.0

import os
import subprocess

prefix = os.environ.get("MESON_INSTALL_PREFIX", "/usr/local")
datadir = os.path.join(prefix, "share")

if "DESTDIR" not in os.environ:
    print("Compiling GSettings schemas...")
    schemas_dir = os.path.join(datadir, "glib-2.0", "schemas")
    if not os.path.exists(schemas_dir):
        os.makedirs(schemas_dir)
    subprocess.call(["glib-compile-schemas", schemas_dir])