help gdb pick up python3 (#7104)

* Update gdb to autotools package
* Help gdb find python libraries for python 3
This commit is contained in:
healther 2018-03-01 08:13:06 +01:00 committed by scheibelp
parent b4b01b82ac
commit 1ac0bce3e9

View file

@ -25,7 +25,7 @@
from spack import * from spack import *
class Gdb(Package): class Gdb(AutotoolsPackage):
"""GDB, the GNU Project debugger, allows you to see what is going on """GDB, the GNU Project debugger, allows you to see what is going on
'inside' another program while it executes -- or what another 'inside' another program while it executes -- or what another
program was doing at the moment it crashed. program was doing at the moment it crashed.
@ -52,10 +52,10 @@ class Gdb(Package):
# Optional dependency # Optional dependency
depends_on('python', when='+python') depends_on('python', when='+python')
def install(self, spec, prefix): def configure_args(self):
options = ['--prefix=%s' % prefix] args = []
if '+python' in spec: if '+python' in self.spec:
options.extend(['--with-python']) args.append('--with-python')
configure(*options) args.append('LDFLAGS={0}'.format(
make() self.spec['python'].libs.ld_flags))
make("install") return args