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.
This commit is contained in:

committed by
Todd Gamblin

parent
c0699539d5
commit
73c978ddd9
@@ -23,7 +23,6 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
from distutils.dir_util import copy_tree
|
||||
|
||||
|
||||
class Clapack(MakefilePackage):
|
||||
@@ -46,7 +45,7 @@ class Clapack(MakefilePackage):
|
||||
depends_on('atlas', when='+external-blas')
|
||||
|
||||
def edit(self, spec, prefix):
|
||||
install('make.inc.example', 'make.inc')
|
||||
copy('make.inc.example', 'make.inc')
|
||||
if '+external-blas' in spec:
|
||||
make_inc = FileFilter('make.inc')
|
||||
make_inc.filter(r'^BLASLIB.*',
|
||||
@@ -60,4 +59,4 @@ def build(self, spec, prefix):
|
||||
make('lib')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
copy_tree('.', prefix)
|
||||
install_tree('.', prefix)
|
||||
|
Reference in New Issue
Block a user