summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorNathan Hanford <8302958+nhanford@users.noreply.github.com>2022-04-04 14:45:35 -0700
committerGitHub <noreply@github.com>2022-04-04 14:45:35 -0700
commit88d8ca9b6504dca4973784932c0ea90fe8cd3f83 (patch)
tree2c3f8d668bc59154029149b44d5d18f9d9eaf37a /var
parent8ddaa08ed2aacb4b5e587a33c625492cbdd4886e (diff)
downloadspack-88d8ca9b6504dca4973784932c0ea90fe8cd3f83.tar.gz
spack-88d8ca9b6504dca4973784932c0ea90fe8cd3f83.tar.bz2
spack-88d8ca9b6504dca4973784932c0ea90fe8cd3f83.tar.xz
spack-88d8ca9b6504dca4973784932c0ea90fe8cd3f83.zip
rewiring of spliced specs (#26873)
* tests for rewiring pure specs to spliced specs * relocate text, binaries, and links * using llnl.util.symlink for windows compat. Note: This does not include CLI hooks for relocation. Co-authored-by: Nathan Hanford <hanford1@llnl.gov>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin.mock/packages/splice-h/package.py7
-rw-r--r--var/spack/repos/builtin.mock/packages/splice-t/package.py8
-rw-r--r--var/spack/repos/builtin.mock/packages/splice-z/package.py6
3 files changed, 18 insertions, 3 deletions
diff --git a/var/spack/repos/builtin.mock/packages/splice-h/package.py b/var/spack/repos/builtin.mock/packages/splice-h/package.py
index d57ddf85d2..8236b11766 100644
--- a/var/spack/repos/builtin.mock/packages/splice-h/package.py
+++ b/var/spack/repos/builtin.mock/packages/splice-h/package.py
@@ -6,7 +6,7 @@
from spack import *
-class SpliceH(AutotoolsPackage):
+class SpliceH(Package):
"""Simple package with one optional dependency"""
homepage = "http://www.example.com"
@@ -20,3 +20,8 @@ class SpliceH(AutotoolsPackage):
depends_on('splice-z')
depends_on('splice-z+foo', when='+foo')
+
+ def install(self, spec, prefix):
+ with open(prefix.join('splice-h'), 'w') as f:
+ f.write('splice-h: {0}'.format(prefix))
+ f.write('splice-z: {0}'.format(spec['splice-z'].prefix))
diff --git a/var/spack/repos/builtin.mock/packages/splice-t/package.py b/var/spack/repos/builtin.mock/packages/splice-t/package.py
index f38b627e99..edf373dbf5 100644
--- a/var/spack/repos/builtin.mock/packages/splice-t/package.py
+++ b/var/spack/repos/builtin.mock/packages/splice-t/package.py
@@ -6,7 +6,7 @@
from spack import *
-class SpliceT(AutotoolsPackage):
+class SpliceT(Package):
"""Simple package with one optional dependency"""
homepage = "http://www.example.com"
@@ -16,3 +16,9 @@ class SpliceT(AutotoolsPackage):
depends_on('splice-h')
depends_on('splice-z')
+
+ def install(self, spec, prefix):
+ with open(prefix.join('splice-t'), 'w') as f:
+ f.write('splice-t: {0}'.format(prefix))
+ f.write('splice-h: {0}'.format(spec['splice-h'].prefix))
+ f.write('splice-z: {0}'.format(spec['splice-z'].prefix))
diff --git a/var/spack/repos/builtin.mock/packages/splice-z/package.py b/var/spack/repos/builtin.mock/packages/splice-z/package.py
index c00c936f9d..793dfd1cfe 100644
--- a/var/spack/repos/builtin.mock/packages/splice-z/package.py
+++ b/var/spack/repos/builtin.mock/packages/splice-z/package.py
@@ -6,7 +6,7 @@
from spack import *
-class SpliceZ(AutotoolsPackage):
+class SpliceZ(Package):
"""Simple package with one optional dependency"""
homepage = "http://www.example.com"
@@ -16,3 +16,7 @@ class SpliceZ(AutotoolsPackage):
variant('foo', default=False, description='nope')
variant('bar', default=False, description='nope')
+
+ def install(self, spec, prefix):
+ with open(prefix.join('splice-z'), 'w') as f:
+ f.write('splice-z: {0}'.format(prefix))