Commit 6c8a5bea authored by Kai Willadsen's avatar Kai Willadsen

build_helpers: Support compiling gsettings schemas, and add an opt-out

parent 7958c507
......@@ -40,6 +40,19 @@ distribution, and can be installed on OSX using MacPorts/Fink/etc. See the wiki
for options for getting Meld working on Windows.
Meld uses standard distutils for building. It supports anything that distutils
supports, and little else.
Additional hacks are added to make life easier for packagers where required,
such as:
* The NO_COMPILE_SCHEMAS schemas environment variable will, if set to 1, stop
Meld from compiling gsettings schemas post-install.
......@@ -22,6 +22,7 @@ from __future__ import print_function
import distutils.cmd
import distutils.command.install_data
import distutils.dir_util
import glob
import os.path
......@@ -273,3 +274,28 @@ class build_i18n(distutils.cmd.Command):
self.distribution.data_files.append((target, files_merged))
class install_data(distutils.command.install_data.install_data):
user_options = [
("no-compile-schemas", None,
"Don't compile gsettings schemas post-install"),
boolean_options = ["no-compile-schemas"]
def initialize_options(self):
self.no_compile_schemas = None
def finalize_options(self):
if self.no_compile_schemas is None:
self.no_compile_schemas = bool(os.environ['NO_COMPILE_SCHEMAS'])
def run(self):
if not self.no_compile_schemas:
gschema_path = build_data.gschemas[0][0]
gschema_install = os.path.join(self.install_dir, gschema_path)
self.spawn(["glib-compile-schemas", gschema_install])
......@@ -59,5 +59,6 @@ setup(
"build_help": meld.build_helpers.build_help,
"build_icons": meld.build_helpers.build_icons,
"build_data": meld.build_helpers.build_data,
"install_data": meld.build_helpers.install_data,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment