summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorRoman Briskine <brisk022@users.noreply.github.com>2019-11-26 18:22:31 +0000
committerAdam J. Stewart <ajstewart426@gmail.com>2019-11-26 12:22:31 -0600
commiteb0561735dd8b71c83b8bc31f3f0fb7d81388511 (patch)
tree04e32b7af2eeac40f8c39242dcc2f1e79ad44fd0 /var
parent18cf751d1313967cace6a79aad6b69a605ffb65b (diff)
downloadspack-eb0561735dd8b71c83b8bc31f3f0fb7d81388511.tar.gz
spack-eb0561735dd8b71c83b8bc31f3f0fb7d81388511.tar.bz2
spack-eb0561735dd8b71c83b8bc31f3f0fb7d81388511.tar.xz
spack-eb0561735dd8b71c83b8bc31f3f0fb7d81388511.zip
Update Mathematica recipe (#13679)
* Add licensing; replace url with url_for_version; create .spack dir during installation; symlink wolframscript; generate spec.yaml if missing * Reverted url change, .spack directory creation, and spec.yaml generation * Fix formatting issues
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/mathematica/package.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/mathematica/package.py b/var/spack/repos/builtin/packages/mathematica/package.py
index c86d98fa75..4fc25436ae 100644
--- a/var/spack/repos/builtin/packages/mathematica/package.py
+++ b/var/spack/repos/builtin/packages/mathematica/package.py
@@ -20,12 +20,26 @@ class Mathematica(Package):
homepage = "https://www.wolfram.com/mathematica/"
url = 'file://{0}/Mathematica_12.0.0_LINUX.sh'.format(os.getcwd())
- version('12.0.0', sha256='b9fb71e1afcc1d72c200196ffa434512d208fa2920e207878433f504e58ae9d7',
+ version('12.0.0',
+ sha256='b9fb71e1afcc1d72c200196ffa434512d208fa2920e207878433f504e58ae9d7',
expand=False)
+ # Licensing
+ license_required = True
+ license_comment = '#'
+ license_files = ['Configuration/Licensing/mathpass']
+ license_url = 'https://reference.wolfram.com/language/tutorial/RegistrationAndPasswords.html#857035062'
+
def install(self, spec, prefix):
sh = which('sh')
sh(self.stage.archive_file, '--', '-auto', '-verbose',
'-targetdir={0}'.format(prefix),
'-execdir={0}'.format(prefix.bin),
'-selinux=y')
+ # This is what most people would use on a cluster but the installer
+ # does not symlink it
+ ws_link_path = os.path.join(prefix.bin, 'wolframscript')
+ if not os.path.exists(ws_link_path):
+ ln = which('ln')
+ ws_path = os.path.join(prefix, 'Executables', 'wolframscript')
+ ln('-s', ws_path, ws_link_path)