From 1eb7b8cf4624910121ac66996f17a212ed2cfc91 Mon Sep 17 00:00:00 2001 From: "Kelly (KT) Thompson" Date: Tue, 22 Mar 2016 12:31:27 -0600 Subject: [PATCH] + Add a validate function that refuses to build numdiff if arch is darwin-x86_64. --- .../repos/builtin/packages/numdiff/package.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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()