[gjs] meson: Convert build/compile-gschemas.sh into Python
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] meson: Convert build/compile-gschemas.sh into Python
- Date: Sat, 26 Oct 2019 04:58:06 +0000 (UTC)
commit 5056257488e42790334f2018daacb9ec84465a80
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 0eafb27c..36ad3302 100644
--- a/meson.build
+++ b/meson.build
@@ -480,7 +480,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]