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>
This commit is contained in:
@@ -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 @@ def install(self, spec, prefix):
|
||||
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):
|
||||
|
Reference in New Issue
Block a user