summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin S <3630356+codeandkey@users.noreply.github.com>2019-05-30 12:21:16 -0500
committerElizabeth Fischer <rpf2116@columbia.edu>2019-05-30 13:21:16 -0400
commit9b88f1b851413aa9f79b25938a7637c97bfe9a41 (patch)
tree8aa0ee5f8024184dc40e846147e7cc3fb0be3a85
parent8b81f821569aa142315b9c652456cc9309c6b5f2 (diff)
downloadspack-9b88f1b851413aa9f79b25938a7637c97bfe9a41.tar.gz
spack-9b88f1b851413aa9f79b25938a7637c97bfe9a41.tar.bz2
spack-9b88f1b851413aa9f79b25938a7637c97bfe9a41.tar.xz
spack-9b88f1b851413aa9f79b25938a7637c97bfe9a41.zip
mathematica: new package at 12.0.0 (#11509)
* mathematica: new package at 12.0.0 * mathematica: add missing os import * mathematica: fix url format
-rw-r--r--var/spack/repos/builtin/packages/mathematica/package.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/mathematica/package.py b/var/spack/repos/builtin/packages/mathematica/package.py
new file mode 100644
index 0000000000..9386e06f6d
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mathematica/package.py
@@ -0,0 +1,39 @@
+# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+import os
+
+
+class Mathematica(Package):
+ """Mathematica: high-powered computation with thousands of Wolfram Language
+ functions, natural language input, real-world data, mobile support.
+
+ Note: A manual download is required for Mathematica.
+ Spack will search your current directory for the download file.
+ Alternatively, add this file to a mirror so that Spack can find it.
+ For instructions on how to set up a mirror, see
+ http://spack.readthedocs.io/en/latest/mirrors.html"""
+
+ homepage = "https://www.wolfram.com/mathematica/"
+ url = 'file://{0}/Mathematica_12.0.0_LINUX.sh'.format(os.getcwd())
+
+ version('12.0.0', sha256='b9fb71e1afcc1d72c200196ffa434512d208fa2920e207878433f504e58ae9d7',
+ expand=False)
+
+ 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')
+
+ # after the install phase completes, spack tries to install build.out
+ # into <prefix>/.spack, but the .spack dir will not exist, causing the
+ # build to fail. package.py:1690 seems to show that the dir is created
+ # right before writing build.out -- possible bug?
+
+ # creating the .spack dir right after installing prevents explosions
+ mkdirp(join_path(prefix, '.spack'))