summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin S <3630356+codeandkey@users.noreply.github.com>2019-05-14 15:16:32 -0500
committerLevi Baber <baber@iastate.edu>2019-05-14 15:16:32 -0500
commitc6d34076dc4d384608dca0f0724e4ab851aaba6d (patch)
tree696d8ee02bfde7d3cbcaccb0f5f1386525a18751
parent5cd593743e8bb19a3d6fe8bfd7b0c20437b108d2 (diff)
downloadspack-c6d34076dc4d384608dca0f0724e4ab851aaba6d.tar.gz
spack-c6d34076dc4d384608dca0f0724e4ab851aaba6d.tar.bz2
spack-c6d34076dc4d384608dca0f0724e4ab851aaba6d.tar.xz
spack-c6d34076dc4d384608dca0f0724e4ab851aaba6d.zip
repeatmasker: add 4.0.9, refactor interactive config (#11385)
-rw-r--r--var/spack/repos/builtin/packages/repeatmasker/package.py33
1 files changed, 23 insertions, 10 deletions
diff --git a/var/spack/repos/builtin/packages/repeatmasker/package.py b/var/spack/repos/builtin/packages/repeatmasker/package.py
index f91f71aaba..bac7eb8377 100644
--- a/var/spack/repos/builtin/packages/repeatmasker/package.py
+++ b/var/spack/repos/builtin/packages/repeatmasker/package.py
@@ -4,7 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
-import inspect
class Repeatmasker(Package):
@@ -14,6 +13,7 @@ class Repeatmasker(Package):
homepage = "http://www.repeatmasker.org"
url = "http://www.repeatmasker.org/RepeatMasker-open-4-0-7.tar.gz"
+ version('4.0.9', sha256='8d67415d89ed301670b7632ea411f794c6e30d8ed0f007a726c4b0a39c8638e5')
version('4.0.7', '4dcbd7c88c5343e02d819f4b3e6527c6')
variant('crossmatch', description='Enable CrossMatch search engine',
@@ -50,24 +50,37 @@ class Repeatmasker(Package):
# Repeatmasker? (Y/N)
# Add a Search Engine: Done
- config_answers = ['\n', '%s\n' % self.spec['perl'].command.path,
- '%s\n' % self.stage.source_path,
- '%s\n' % self.spec['trf'].prefix.bin.trf, '2\n',
- '%s\n' % self.spec['ncbi-rmblastn'].prefix.bin,
- 'Y\n']
+ config_answers = []
+ if spec.satisfies('@4.0.9:'):
+ # 4.0.9 removes a bunch of the interactive options
+ config_answers.append('')
+ else:
+ config_answers.extend(['',
+ self.spec['perl'].command.path,
+ self.stage.source_path,
+ self.spec['trf'].prefix.bin.trf])
+
+ # add crossmatch search
if '+crossmatch' in spec:
crossmatch = self.spec['phrap-crossmatch-swat'].prefix.bin
- config_answers.extend(['1\n', '%s\n' % crossmatch, 'N\n'])
+ config_answers.extend(['1', crossmatch, 'N'])
+
+ # set default BLAST search
+ config_answers.extend(['2',
+ self.spec['ncbi-rmblastn'].prefix.bin,
+ 'Y'])
- config_answers.append('5\n')
+ # end configuration
+ config_answers.append('5')
config_answers_filename = 'spack-config.in'
with open(config_answers_filename, 'w') as f:
- f.writelines(config_answers)
+ f.write('\n'.join(config_answers))
with open(config_answers_filename, 'r') as f:
- inspect.getmodule(self).perl('configure', input=f)
+ perl = which('perl')
+ perl('configure', input=f)
install_tree('.', prefix.bin)