Skip to content

Commit a7e1b7c

Browse files
authored
Merge pull request #2727 from jfgrimm/20220531151054_new_pr_mrbayes
enhance MrBayes easyblock with custom sanity check command
2 parents 8cf0f76 + d6fc709 commit a7e1b7c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

easybuild/easyblocks/m/mrbayes.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
@author: Jens Timmerman (Ghent University)
3333
@author: Andy Georges (Ghent University)
3434
@author: Maxime Boissonneault (Compute Canada, Calcul Quebec, Universite Laval)
35+
@author: Jasper Grimm (University of York)
3536
"""
3637

3738
import os
@@ -47,6 +48,14 @@
4748
class EB_MrBayes(ConfigureMake):
4849
"""Support for building/installing MrBayes."""
4950

51+
def __init__(self, *args, **kwargs):
52+
super(EB_MrBayes, self).__init__(*args, **kwargs)
53+
# For later MrBayes versions, no longer need to use this easyblock
54+
last_supported_version = '3.2.6'
55+
if LooseVersion(self.version) > LooseVersion(last_supported_version):
56+
raise EasyBuildError("Please use the ConfigureMake easyblock for %s versions > %s", self.name,
57+
last_supported_version)
58+
5059
def configure_step(self):
5160
"""Configure build: <single-line description how this deviates from standard configure>"""
5261

@@ -106,4 +115,6 @@ def sanity_check_step(self):
106115
'dirs': [],
107116
}
108117

109-
super(EB_MrBayes, self).sanity_check_step(custom_paths=custom_paths)
118+
custom_commands = ["mb <<< %s" % x for x in ["about", "help"]]
119+
120+
super(EB_MrBayes, self).sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands)

0 commit comments

Comments
 (0)