diff options
author | Patrick Gartung <gartung@fnal.gov> | 2020-10-26 14:37:54 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 12:37:54 -0700 |
commit | 1c2c30a139296d53a7474a6f53e542a05b5e685d (patch) | |
tree | 9e534fe699df82d0b5c089819a1ea632089d5d6f /var | |
parent | 718150b99766a8fa0193ae589c38bf16e0060eca (diff) | |
download | spack-1c2c30a139296d53a7474a6f53e542a05b5e685d.tar.gz spack-1c2c30a139296d53a7474a6f53e542a05b5e685d.tar.bz2 spack-1c2c30a139296d53a7474a6f53e542a05b5e685d.tar.xz spack-1c2c30a139296d53a7474a6f53e542a05b5e685d.zip |
sbang: put sbang in the install_tree (#11598)
`sbang` is not always accessible to users of packages, e.g., if Spack
is installed in someone's home directory and they deploy software
for others. Avoid this by:
1. Always installing the `sbang` script in the `install_tree`
2. Relocating binaries to point to the copy in the `install_tree`
and not the one in the Spack installation.
This PR also:
- ensures that `sbang` is reinstalled if it is modified in Spack
- adds tests
- updates the way `gobject-introspection` patches Makefiles
to support `sbang`
Co-authored-by: Todd Gamblin <tgamblin@llnl.gov>
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/gobject-introspection/package.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/gobject-introspection/package.py b/var/spack/repos/builtin/packages/gobject-introspection/package.py index 20823fd77f..f31442f1f4 100644 --- a/var/spack/repos/builtin/packages/gobject-introspection/package.py +++ b/var/spack/repos/builtin/packages/gobject-introspection/package.py @@ -4,7 +4,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * -from spack.paths import spack_root +import spack.hooks.sbang as sbang class GobjectIntrospection(Package): @@ -72,7 +72,7 @@ class GobjectIntrospection(Package): make("install") def setup_build_environment(self, env): - env.set('SPACK_SBANG', "%s/bin/sbang" % spack_root) + env.set('SPACK_SBANG', sbang.sbang_install_path()) @property def parallel(self): |