diff --git a/var/spack/repos/builtin/packages/glib/package.py b/var/spack/repos/builtin/packages/glib/package.py index e517f0a693..a8bb034f04 100644 --- a/var/spack/repos/builtin/packages/glib/package.py +++ b/var/spack/repos/builtin/packages/glib/package.py @@ -81,9 +81,10 @@ def url_for_version(self, version): def configure_args(self): args = [] args.extend(self.enable_or_disable('libmount')) - args.append('--with-python={0}'.format( - os.path.basename(self.spec['python'].command.path)) - ) + if self.spec.satisfies('@2.53.4:'): + args.append('--with-python={0}'.format( + os.path.basename(self.spec['python'].command.path)) + ) args.extend(self.enable_or_disable('tracing')) return args