glib: fix 2.56 build with python@2 (#17144)

* glib: fix 2.56 build with python@2

* flake8
This commit is contained in:
Seth R. Johnson 2020-06-18 00:32:25 -04:00 committed by GitHub
parent c8199ece65
commit 1bb94f2913
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,10 +141,18 @@ def configure_args(self):
args.append('--with-libiconv=maybe')
else:
args.append('--with-libiconv=gnu')
if 'tracing=dtrace' in self.spec or 'tracing=systemtap' in self.spec:
args.append('--enable-tracing')
if self.spec.satisfies('@2.56:'):
for value in ('dtrace', 'systemtap'):
if ('tracing=' + value) in self.spec:
args.append('--enable-' + value)
else:
args.append('--disable-' + value)
else:
args.append('--disable-tracing')
if ('tracing=dtrace' in self.spec
or 'tracing=systemtap' in self.spec):
args.append('--enable-tracing')
else:
args.append('--disable-tracing')
# SELinux is not available in Spack, so glib should not use it.
args.append('--disable-selinux')
# glib should not use the globally installed gtk-doc. Otherwise,