summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin.mock/packages/when-directives-false/package.py
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2019-06-29 15:07:07 -0700
committerPeter Scheibel <scheibel1@llnl.gov>2019-07-01 18:45:44 -0700
commit515b4045e940b44ffe1295c483a78074abeae96c (patch)
treeb50b359b3fe60a1b5df1ace37941a3fb87931b8b /var/spack/repos/builtin.mock/packages/when-directives-false/package.py
parent12b9fad7b6bf578cf7d0c942e585e311cc9b4cb7 (diff)
downloadspack-515b4045e940b44ffe1295c483a78074abeae96c.tar.gz
spack-515b4045e940b44ffe1295c483a78074abeae96c.tar.bz2
spack-515b4045e940b44ffe1295c483a78074abeae96c.tar.xz
spack-515b4045e940b44ffe1295c483a78074abeae96c.zip
specs: remove parse_anonymous_spec(); use Spec() instead
- `parse_anonymous_spec()` is a vestige of the days when Spack didn't support nameless specs. We don't need it anymore because now we can write Spec() for a spec that will match anything, and satisfies() semantics work properly for anonymous specs. - Delete `parse_anonymous_spec()` and replace its uses with simple calls to the Spec() constructor. - make then handling of when='...' specs in directives more consistent. - clean up Spec.__contains__() - refactor directives and tests slightly to accommodate the change.
Diffstat (limited to 'var/spack/repos/builtin.mock/packages/when-directives-false/package.py')
-rw-r--r--var/spack/repos/builtin.mock/packages/when-directives-false/package.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/when-directives-false/package.py b/var/spack/repos/builtin.mock/packages/when-directives-false/package.py
new file mode 100644
index 0000000000..bdb24cac79
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/when-directives-false/package.py
@@ -0,0 +1,28 @@
+# 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 *
+
+
+class WhenDirectivesFalse(Package):
+ """Package that tests False when specs on directives."""
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/example-1.0.tar.gz"
+
+ version('1.0', '0123456789abcdef0123456789abcdef')
+
+ patch('https://example.com/foo.patch',
+ sha256='abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234',
+ when=False)
+ extends('extendee', when=False)
+ depends_on('b', when=False)
+ conflicts('@1.0', when=False)
+ resource(url="http://www.example.com/example-1.0-resource.tar.gz",
+ md5='0123456789abcdef0123456789abcdef',
+ when=False)
+
+ def install(self, spec, prefix):
+ pass