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
This commit is contained in:
Benjamin Tovar 2020-03-18 14:14:45 -04:00 committed by GitHub
parent 9372783de6
commit 8cdd78cd1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 @@ def patch(self):
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