summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin.mock/packages/noversion/package.py
diff options
context:
space:
mode:
authorTamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>2019-08-22 11:08:23 -0700
committerPeter Scheibel <scheibel1@llnl.gov>2019-08-22 11:08:23 -0700
commitc9e214f6d37af9320afc3a3bca304143c91254e7 (patch)
treeeee05c06e8fbe6f2e68a60f3e35be1fc1aa6793c /var/spack/repos/builtin.mock/packages/noversion/package.py
parent47238b9714d6ef32e7867ac915936cc5bd6599fd (diff)
downloadspack-c9e214f6d37af9320afc3a3bca304143c91254e7.tar.gz
spack-c9e214f6d37af9320afc3a3bca304143c91254e7.tar.bz2
spack-c9e214f6d37af9320afc3a3bca304143c91254e7.tar.xz
spack-c9e214f6d37af9320afc3a3bca304143c91254e7.zip
Spack BundlePackage: a group of other packages (#11981)
This adds a special package type to Spack which is used to aggregate a set of packages that a user might commonly install together; it does not include any source code itself and does not require a download URL like other Spack packages. It may include an 'install' method to generate scripts, and Spack will run post-install hooks (including module generation). * Add new BundlePackage type * Update the Xsdk package to be a BundlePackage and remove the 'install' method (previously it had a noop install method) * "spack create --template" now takes "bundle" as an option * Rename cmd_create_repo fixture to "mock_test_repo" and relocate it to shared pytest fixtures * Add unit tests for BundlePackage behavior
Diffstat (limited to 'var/spack/repos/builtin.mock/packages/noversion/package.py')
-rw-r--r--var/spack/repos/builtin.mock/packages/noversion/package.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/var/spack/repos/builtin.mock/packages/noversion/package.py b/var/spack/repos/builtin.mock/packages/noversion/package.py
new file mode 100644
index 0000000000..40889a6a11
--- /dev/null
+++ b/var/spack/repos/builtin.mock/packages/noversion/package.py
@@ -0,0 +1,19 @@
+# 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 Noversion(Package):
+ """
+ Simple package with no version, which should be rejected since a version
+ is required.
+ """
+
+ homepage = "http://www.example.com"
+ url = "http://www.example.com/a-1.0.tar.gz"
+
+ def install(self, spec, prefix):
+ touch(join_path(prefix, 'an_installation_file'))