[gjs/meson.msvc: 8/9] meson: Convert build/compile-gschemas.sh into Python
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs/meson.msvc: 8/9] meson: Convert build/compile-gschemas.sh into Python
- Date: Fri, 25 Oct 2019 10:37:34 +0000 (UTC)
commit aea4ec3e15b68ba3856e4a32baa913d7995576f9
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Fri Oct 25 17:41:02 2019 +0800
meson: Convert build/compile-gschemas.sh into Python
This is so that we can also use this script on Windows MSVC builds,
which do not support shell scripts out-of-the-box.
build/compile-gschemas.py | 11 +++++++++++
build/compile-gschemas.sh | 8 --------
meson.build | 2 +-
3 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/build/compile-gschemas.py b/build/compile-gschemas.py
new file mode 100644
index 00000000..3dd1729d
--- /dev/null
+++ b/build/compile-gschemas.py
@@ -0,0 +1,11 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+
+prefix = os.environ.get('MESON_INSTALL_PREFIX')
+schemadir = os.path.join(prefix, 'share', 'glib-2.0', 'schemas')
+
+if os.environ.get('DESTDIR') is None:
+ print('Compiling GSettings schemas...')
+ subprocess.call(['glib-compile-schemas', schemadir])
diff --git a/meson.build b/meson.build
index 60ab89df..e5838c20 100644
--- a/meson.build
+++ b/meson.build
@@ -557,7 +557,7 @@ install_data('installed-tests/extra/lsan.supp',
if get_option('installed_tests')
install_data('installed-tests/js/org.gnome.GjsTest.gschema.xml',
install_dir: get_option('datadir') / 'glib-2.0/schemas')
- meson.add_install_script('build/compile-gschemas.sh')
+ meson.add_install_script('build/compile-gschemas.py')
endif
### Generate pkg-config file ###################################################
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]