From 8cdd78cd1d6b9630377d639a71338209fcfd9419 Mon Sep 17 00:00:00 2001 From: Benjamin Tovar Date: Wed, 18 Mar 2020 14:14:45 -0400 Subject: Cctools 7.1.0 (#15506) * update to 7.1.0 * adds gettext as dependency (needed to link with python) * disable python2 or python3 as needed --- .../repos/builtin/packages/cctools/package.py | 53 +++++++++++++++++----- 1 file changed, 41 insertions(+), 12 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/cctools/package.py b/var/spack/repos/builtin/packages/cctools/package.py index 481e4a47f1..973a6c3d11 100644 --- a/var/spack/repos/builtin/packages/cctools/package.py +++ b/var/spack/repos/builtin/packages/cctools/package.py @@ -13,16 +13,17 @@ class Cctools(AutotoolsPackage): """ homepage = "https://github.com/cooperative-computing-lab/cctools" - url = "https://github.com/cooperative-computing-lab/cctools/archive/release/6.1.1.tar.gz" + url = "https://github.com/cooperative-computing-lab/cctools/archive/release/7.1.0.tar.gz" + version('7.1.0', sha256='84748245db10ff26c0c0a7b9fd3ec20fbbb849dd4aadc5e8531fd1671abe7a81') version('7.0.18', sha256='5b6f3c87ae68dd247534a5c073eb68cb1a60176a7f04d82699fbc05e649a91c2') version('6.1.1', sha256='97f073350c970d6157f80891b3bf6d4f3eedb5f031fea386dc33e22f22b8af9d') depends_on('openssl') depends_on('perl+shared', type=('build', 'run')) - depends_on('python@:2.9', when='@6.1.1', type=('build', 'run')) depends_on('python', type=('build', 'run')) depends_on('readline') + depends_on('gettext') # Corrects python linking of -lintl flag. depends_on('swig') # depends_on('xrootd') depends_on('zlib') @@ -44,21 +45,49 @@ class Cctools(AutotoolsPackage): def configure_args(self): args = [] - # For python - if self.spec.satisfies('^python@3:'): - args.append('--with-python-path=no') - args.append( - '--with-python3-path={0}'.format(self.spec['python'].prefix) - ) + + # make sure we do not pick a python outside spack: + if self.spec.satisfies('@6.1.1'): + if self.spec.satisfies('^python@3:'): + args.extend([ + '--with-python3-path', self.spec['python'].prefix, + '--with-python-path', 'no' + ]) + elif self.spec.satisfies('^python@:2.9'): + args.extend([ + '--with-python-path', self.spec['python'].prefix, + '--with-python3-path', 'no' + ]) + else: + args.extend([ + '--with-python-path', 'no', + '--with-python3-path', 'no' + ]) else: - args.append('--with-python3-path=no') - args.append( - '--with-python-path={0}'.format(self.spec['python'].prefix) - ) + # versions 7 and above, where --with-python-path recognized the + # python version: + if self.spec.satisfies('^python@3:'): + args.extend([ + '--with-python-path', self.spec['python'].prefix, + '--with-python2-path', 'no' + ]) + elif self.spec.satisfies('^python@:2.9'): + args.extend([ + '--with-python-path', self.spec['python'].prefix, + '--with-python3-path', 'no' + ]) + else: + args.extend([ + '--with-python2-path', 'no', + '--with-python3-path', 'no' + ]) + # disable these bits for p in ['mysql', 'xrootd']: args.append('--with-{0}-path=no'.format(p)) + # point these bits at the Spack installations for p in ['openssl', 'perl', 'readline', 'swig', 'zlib']: args.append('--with-{0}-path={1}'.format(p, self.spec[p].prefix)) + return args -- cgit v1.2.3-60-g2f50