diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2018-08-15 11:30:09 -0500 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2018-08-15 09:30:09 -0700 |
commit | 73c978ddd99973e29f2ba42078b10455c1de5ca8 (patch) | |
tree | 681d7ae0d3699ce8c73c126a2310f3c7430efd69 /var/spack/repos/builtin/packages/igvtools/package.py | |
parent | c0699539d56bc16271861dc0de61534f369f1bb9 (diff) | |
download | spack-73c978ddd99973e29f2ba42078b10455c1de5ca8.tar.gz spack-73c978ddd99973e29f2ba42078b10455c1de5ca8.tar.bz2 spack-73c978ddd99973e29f2ba42078b10455c1de5ca8.tar.xz spack-73c978ddd99973e29f2ba42078b10455c1de5ca8.zip |
install_tree, copy_tree can install into existing directory structures (#8289)
Replace use of `shutil.copytree` with `copy_tree` and `install_tree` functions in `llnl.util.filesystem`.
- `copy_tree` copies without setting permissions. It should be used to copy files around in the build directory.
- `install_tree` copies files and sets permissions. It should be used to copy files into the installation directory.
- `install` and `copy` are analogous single-file functions.
- add more extensive tests for these functions
- update packages to use these functions.
Diffstat (limited to 'var/spack/repos/builtin/packages/igvtools/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/igvtools/package.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/igvtools/package.py b/var/spack/repos/builtin/packages/igvtools/package.py index 03e8dee653..410a409d63 100644 --- a/var/spack/repos/builtin/packages/igvtools/package.py +++ b/var/spack/repos/builtin/packages/igvtools/package.py @@ -23,7 +23,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## from spack import * -from shutil import copyfile import os @@ -47,13 +46,13 @@ class Igvtools(Package): # Set up a helper script to call java on the jar file, # explicitly codes the path for java and the jar file. script_sh = join_path(os.path.dirname(__file__), "igvtools.sh") - script = join_path(prefix.bin, "igvtools") - copyfile(script_sh, script) + script = prefix.bin.igvtools + install(script_sh, script) set_executable(script) # Munge the helper script to explicitly point to java and the # jar file. - java = join_path(self.spec['jdk'].prefix, 'bin', 'java') + java = spec['jdk'].prefix.bin.java kwargs = {'ignore_absent': False, 'backup': False, 'string': False} filter_file('^java', java, script, **kwargs) filter_file(jar_file, join_path(prefix.bin, jar_file), |