[gsettings-desktop-schemas/wip/nacho/post-install-py] Convert post-install script to python
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gsettings-desktop-schemas/wip/nacho/post-install-py] Convert post-install script to python
- Date: Fri, 21 Dec 2018 11:08:40 +0000 (UTC)
commit 87a17952c775c51f6cf946ec8e3f43e06d847656
Author: Ignacio Casal Quinteiro <qignacio amazon com>
Date: Fri Dec 21 12:07:24 2018 +0100
Convert post-install script to python
This way it can be used on windows as well
build-aux/meson/post-install.py | 13 +++++++++++++
build-aux/meson/post-install.sh | 9 ---------
meson.build | 4 ++--
3 files changed, 15 insertions(+), 11 deletions(-)
---
diff --git a/build-aux/meson/post-install.py b/build-aux/meson/post-install.py
new file mode 100755
index 0000000..162f26d
--- /dev/null
+++ b/build-aux/meson/post-install.py
@@ -0,0 +1,13 @@
+#!/usr/bin/env python3
+
+import os
+import subprocess
+import sys
+
+datadir = sys.argv[1]
+
+# Packaging tools define DESTDIR and this isn't needed for them
+if 'DESTDIR' not in os.environ:
+ print('Compiling GSettings schemas...')
+ subprocess.call(['glib-compile-schemas',
+ os.path.join(datadir, 'glib-2.0', 'schemas')])
diff --git a/meson.build b/meson.build
index 057c569..ff08594 100644
--- a/meson.build
+++ b/meson.build
@@ -41,6 +41,6 @@ subdir('headers')
subdir('schemas')
subdir('po')
-# Keep this in sync with post-install.sh expected arguments
-meson.add_install_script('build-aux/meson/post-install.sh',
+# Keep this in sync with post-install.py expected arguments
+meson.add_install_script('build-aux/meson/post-install.py',
datadir)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]