Skip to content

Commit 979974c

Browse files
authored
Merge pull request #3707 from sassy-crick/20250429195235_new_pr_mathematica
Update Mathematica easyblock to support versions > 14.1
2 parents 3015d33 + 37655b7 commit 979974c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

easybuild/easyblocks/m/mathematica.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,18 @@ def install_step(self):
7676
# Starting at V13, Mathematica have renamed their install file...
7777
if LooseVersion(self.version) >= LooseVersion("13"):
7878
install_script_glob = '%s_%s_*LINUX*.sh' % (self.name, self.version)
79+
if LooseVersion(self.version) >= LooseVersion("14.1"):
80+
install_script_glob = 'Wolfram_%s_LIN.sh' % (self.version)
7981

8082
matches = glob.glob(install_script_glob)
8183
if len(matches) == 1:
8284
install_script = matches[0]
8385
cmd = self.cfg['preinstallopts'] + './' + install_script
8486
shortver = '.'.join(self.version.split('.')[:2])
8587
qa_install_path = os.path.join('/usr', 'local', 'Wolfram', self.name, shortver)
88+
if LooseVersion(self.version) >= LooseVersion("14.1"):
89+
qa_install_path = os.path.join('/usr', 'local', 'Wolfram', 'Wolfram', shortver)
90+
8691
qa = [
8792
(r"Enter the installation directory, or press ENTER to select[\s\n]*%s:[\s\n]*>" % qa_install_path,
8893
self.installdir),
@@ -138,14 +143,17 @@ def post_processing_step(self):
138143
def sanity_check_step(self):
139144
"""Custom sanity check for Mathematica."""
140145
custom_paths = {
141-
'files': ['bin/mathematica'],
146+
'files': ['bin/math'],
142147
'dirs': ['AddOns', 'Configuration', 'Documentation', 'Executables', 'SystemFiles'],
143148
}
144149
if LooseVersion(self.version) >= LooseVersion("11.3.0"):
145150
custom_paths['files'].append('Executables/wolframscript')
146151
elif LooseVersion(self.version) >= LooseVersion("11.0.0"):
147152
custom_paths['files'].append('bin/wolframscript')
148153

149-
custom_commands = ['mathematica --version']
154+
if LooseVersion(self.version) < LooseVersion("14.1"):
155+
custom_commands = ['mathematica --version']
156+
else:
157+
custom_commands = ['wolframnb --version']
150158

151159
super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands)

0 commit comments

Comments
 (0)