From a852028b02c7f4b47cdeb496f78552ec9c7a9642 Mon Sep 17 00:00:00 2001 From: Michael Kuhn Date: Tue, 13 Nov 2018 17:37:19 +0100 Subject: [PATCH] glib: explicitly disable gtk-doc (#9771) glib should not use the globally installed gtk-doc. Otherwise, gtk-doc can fail with Python errors such as `ImportError: No module named site`. This is due to the fact that Spack sets `PYTHONHOME`, which can confuse the global Python installation that is used by gtk-doc. --- var/spack/repos/builtin/packages/glib/package.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index ab554165a1..e21ea6f345 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -72,6 +72,18 @@ def configure_args(self): os.path.basename(self.spec['python'].command.path)) ) args.extend(self.enable_or_disable('tracing')) + # glib should not use the globally installed gtk-doc. Otherwise, + # gtk-doc can fail with Python errors such as "ImportError: No module + # named site". This is due to the fact that Spack sets PYTHONHOME, + # which can confuse the global Python installation used by gtk-doc. + args.append('--disable-gtk-doc-html') + # glib uses gtk-doc even though it should be disabled if it can find + # its binaries. Override the checks to use the true binary. + true = which('true') + args.append('GTKDOC_CHECK={0}'.format(true)) + args.append('GTKDOC_CHECK_PATH={0}'.format(true)) + args.append('GTKDOC_MKPDF={0}'.format(true)) + args.append('GTKDOC_REBASE={0}'.format(true)) return args @property