summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGeorge Hartzell <hartzell@alerce.com>2017-04-25 21:04:20 -0700
committerMassimiliano Culpo <massimiliano.culpo@googlemail.com>2017-04-26 06:04:20 +0200
commit33c9a91d853da82dccf3d244e06c0c3db0061c9a (patch)
tree5793549ef6ce2e59fdb4b64b2d85771f04002bb5 /var
parentd04ae9a2b4c19e45c99f3af3c6d6a2599486ee05 (diff)
downloadspack-33c9a91d853da82dccf3d244e06c0c3db0061c9a.tar.gz
spack-33c9a91d853da82dccf3d244e06c0c3db0061c9a.tar.bz2
spack-33c9a91d853da82dccf3d244e06c0c3db0061c9a.tar.xz
spack-33c9a91d853da82dccf3d244e06c0c3db0061c9a.zip
Make perl and python variants (#3992)
The blast+ configure script supports building --with-{python,perl}=path and --without-{python,perl}. This commit makes the use of those two languages configurable via variants and adds dependencies and explicit --with-... or --without-... flags to configure. Python was a non-optional dependency, now it is a variant that defaults to `True`. Perl was not previously an explicit dependency but the configure script was likely to discover one on your system (`/usr/bin/perl`). It is now a variant that defaults to `True`. I am unable to accurately determine what these flags to the configure script enable. My users are frustrated by the dependency on Python in particular because it constrains the other modules that they can have loaded for new discernible benefit.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/blast-plus/package.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/blast-plus/package.py b/var/spack/repos/builtin/packages/blast-plus/package.py
index 53f09c03a3..7cab51b0be 100644
--- a/var/spack/repos/builtin/packages/blast-plus/package.py
+++ b/var/spack/repos/builtin/packages/blast-plus/package.py
@@ -88,6 +88,10 @@ class BlastPlus(AutotoolsPackage):
description='Build with lzo support')
variant('pcre', default=True,
description='Build with pcre support')
+ variant('perl', default=True,
+ description='Build with perl support')
+ variant('python', default=True,
+ description='Build with python support')
depends_on('jpeg', when='+jpeg')
depends_on('libpng', when='+png')
@@ -100,7 +104,8 @@ class BlastPlus(AutotoolsPackage):
depends_on('lzo', when='+lzo')
depends_on('pcre', when='+pcre')
- depends_on('python')
+ depends_on('python', when='+python')
+ depends_on('perl', when='+perl')
configure_directory = 'c++'
@@ -199,4 +204,18 @@ class BlastPlus(AutotoolsPackage):
else:
config_args.append('--without-pcre')
+ if '+python' in spec:
+ config_args.append(
+ '--with-python={0}'.format(self.spec['python'].prefix)
+ )
+ else:
+ config_args.append('--without-python')
+
+ if '+perl' in spec:
+ config_args.append(
+ '--with-perl={0}'.format(self.spec['perl'].prefix)
+ )
+ else:
+ config_args.append('--without-python')
+
return config_args