Merge remote-tracking branch 'origin/python-updates' into core-updates
[jackhill/guix/guix.git] / gnu / packages / patches / glib-respect-datadir.patch
1 On Guix, Python modules are in a different output from the executables,
2 so searching "../share/glib-2.0" will not work.
3
4 This patch restores behaviour prior to this commit:
5 <https://git.gnome.org/browse/glib/commit/?id=fe2a9887a8ccb14f2386e01b14834e97a33bc2d7>
6
7 --- a/gio/gdbus-2.0/codegen/gdbus-codegen.in
8 +++ b/gio/gdbus-2.0/codegen/gdbus-codegen.in
9 @@ -25,9 +25,12 @@
10
11 srcdir = os.getenv('UNINSTALLED_GLIB_SRCDIR', None)
12 filedir = os.path.dirname(__file__)
13 +datadir = os.path.join('@datadir@', 'glib-2.0')
14
15 if srcdir is not None:
16 path = os.path.join(srcdir, 'gio', 'gdbus-2.0')
17 +elif os.path.exists(os.path.join(datadir, 'codegen')):
18 + path = datadir
19 elif os.path.basename(filedir) == 'bin':
20 # Make the prefix containing gdbus-codegen 'relocatable' at runtime by
21 # adding /some/prefix/bin/../share/glib-2.0 to the python path