diff options
author | Kelly (KT) Thompson <kgt@lanl.gov> | 2016-03-22 12:31:27 -0600 |
---|---|---|
committer | Kelly (KT) Thompson <kgt@lanl.gov> | 2016-03-22 12:31:27 -0600 |
commit | 1eb7b8cf4624910121ac66996f17a212ed2cfc91 (patch) | |
tree | 9bbffe8af45d099bfc6e9a4c92d6dc59b6039e78 | |
parent | 6e0e6d2654c4b56b3326532694613911efd25122 (diff) | |
download | spack-1eb7b8cf4624910121ac66996f17a212ed2cfc91.tar.gz spack-1eb7b8cf4624910121ac66996f17a212ed2cfc91.tar.bz2 spack-1eb7b8cf4624910121ac66996f17a212ed2cfc91.tar.xz spack-1eb7b8cf4624910121ac66996f17a212ed2cfc91.zip |
+ Add a validate function that refuses to build numdiff if arch is darwin-x86_64.
-rw-r--r-- | var/spack/repos/builtin/packages/numdiff/package.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/numdiff/package.py b/var/spack/repos/builtin/packages/numdiff/package.py index a51f6206cf..91286127fb 100644 --- a/var/spack/repos/builtin/packages/numdiff/package.py +++ b/var/spack/repos/builtin/packages/numdiff/package.py @@ -34,7 +34,22 @@ class Numdiff(Package): version('5.8.1', 'a295eb391f6cb1578209fc6b4f9d994e') + def validate(self, spec): + """ + Checks if we are attempting to build on an incompatible + architecture. + + Ref. https://github.com/davydden/homebrew-dealiisuite/blob/master/numdiff.rb#L13-L15. + + :param spec: spec of the package + :raises RuntimeError: in case of inconsistencies. + """ + + if spec.satisfies("=darwin-x86_64"): + raise RuntimeError(msg) + def install(self, spec, prefix): + self.validate(spec) options = ['--prefix=%s' % prefix] configure(*options) make() |