From 1ac0bce3e9c8e1650a48e79a8a787c0a8849485f Mon Sep 17 00:00:00 2001 From: healther Date: Thu, 1 Mar 2018 08:13:06 +0100 Subject: [PATCH] help gdb pick up python3 (#7104) * Update gdb to autotools package * Help gdb find python libraries for python 3 --- var/spack/repos/builtin/packages/gdb/package.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/var/spack/repos/builtin/packages/gdb/package.py b/var/spack/repos/builtin/packages/gdb/package.py index b5d64c70ee..fa2e176ce6 100644 --- a/var/spack/repos/builtin/packages/gdb/package.py +++ b/var/spack/repos/builtin/packages/gdb/package.py @@ -25,7 +25,7 @@ from spack import * -class Gdb(Package): +class Gdb(AutotoolsPackage): """GDB, the GNU Project debugger, allows you to see what is going on 'inside' another program while it executes -- or what another program was doing at the moment it crashed. @@ -52,10 +52,10 @@ class Gdb(Package): # Optional dependency depends_on('python', when='+python') - def install(self, spec, prefix): - options = ['--prefix=%s' % prefix] - if '+python' in spec: - options.extend(['--with-python']) - configure(*options) - make() - make("install") + def configure_args(self): + args = [] + if '+python' in self.spec: + args.append('--with-python') + args.append('LDFLAGS={0}'.format( + self.spec['python'].libs.ld_flags)) + return args