diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2017-03-15 00:26:44 -0500 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2017-03-14 22:26:44 -0700 |
commit | dca4d2b15e6e78058d1ebdb244877470241f8f9c (patch) | |
tree | 609a01fd6b46c1584952590f193ec6752ce38054 /var | |
parent | 560d28ac7f138d7390dafc100728fce2640d8a35 (diff) | |
download | spack-dca4d2b15e6e78058d1ebdb244877470241f8f9c.tar.gz spack-dca4d2b15e6e78058d1ebdb244877470241f8f9c.tar.bz2 spack-dca4d2b15e6e78058d1ebdb244877470241f8f9c.tar.xz spack-dca4d2b15e6e78058d1ebdb244877470241f8f9c.zip |
Consistent docs and usage of env mod methods (#3351)
Diffstat (limited to 'var')
24 files changed, 63 insertions, 63 deletions
diff --git a/var/spack/repos/builtin/packages/bazel/package.py b/var/spack/repos/builtin/packages/bazel/package.py index 95af1e4cc0..d2e3ee8f8a 100644 --- a/var/spack/repos/builtin/packages/bazel/package.py +++ b/var/spack/repos/builtin/packages/bazel/package.py @@ -53,7 +53,7 @@ class Bazel(Package): mkdir(prefix.bin) install('output/bazel', prefix.bin) - def setup_dependent_package(self, module, dep_spec): + def setup_dependent_package(self, module, dependent_spec): class BazelExecutable(Executable): """Special callable executable object for bazel so the user can specify parallel or not on a per-invocation basis. Using @@ -84,8 +84,8 @@ class Bazel(Package): return super(BazelExecutable, self).__call__(*args, **kwargs) jobs = cpu_count() - if not dep_spec.package.parallel: + if not dependent_spec.package.parallel: jobs = 1 - elif dep_spec.package.make_jobs: - jobs = dep_spec.package.make_jobs + elif dependent_spec.package.make_jobs: + jobs = dependent_spec.package.make_jobs module.bazel = BazelExecutable('bazel', 'build', jobs) diff --git a/var/spack/repos/builtin/packages/dealii/package.py b/var/spack/repos/builtin/packages/dealii/package.py index 61dae81a3d..de62ea213c 100644 --- a/var/spack/repos/builtin/packages/dealii/package.py +++ b/var/spack/repos/builtin/packages/dealii/package.py @@ -287,5 +287,5 @@ class Dealii(CMakePackage): return options - def setup_environment(self, spack_env, env): - env.set('DEAL_II_DIR', self.prefix) + def setup_environment(self, spack_env, run_env): + run_env.set('DEAL_II_DIR', self.prefix) diff --git a/var/spack/repos/builtin/packages/docbook-xml/package.py b/var/spack/repos/builtin/packages/docbook-xml/package.py index f1e1a08c8f..cff971f373 100644 --- a/var/spack/repos/builtin/packages/docbook-xml/package.py +++ b/var/spack/repos/builtin/packages/docbook-xml/package.py @@ -42,7 +42,7 @@ class DocbookXml(Package): else: install(src, dst) - def setup_dependent_environment(self, spack_env, run_env, extension_spec): + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): catalog = os.path.join(self.spec.prefix, 'catalog.xml') spack_env.set('XML_CATALOG_FILES', catalog, separator=' ') diff --git a/var/spack/repos/builtin/packages/docbook-xsl/package.py b/var/spack/repos/builtin/packages/docbook-xsl/package.py index 5de9cecdbb..2554e4d7bf 100644 --- a/var/spack/repos/builtin/packages/docbook-xsl/package.py +++ b/var/spack/repos/builtin/packages/docbook-xsl/package.py @@ -44,7 +44,7 @@ class DocbookXsl(Package): else: install(src, dst) - def setup_dependent_environment(self, spack_env, run_env, extension_spec): + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): catalog = os.path.join(self.spec.prefix, 'catalog.xml') spack_env.set('XML_CATALOG_FILES', catalog, separator=' ') diff --git a/var/spack/repos/builtin/packages/everytrace-example/package.py b/var/spack/repos/builtin/packages/everytrace-example/package.py index 76b437a38a..17a7ed8658 100644 --- a/var/spack/repos/builtin/packages/everytrace-example/package.py +++ b/var/spack/repos/builtin/packages/everytrace-example/package.py @@ -38,5 +38,5 @@ class EverytraceExample(CMakePackage): # Currently the only MPI this everytrace works with. depends_on('openmpi') - def setup_environment(self, spack_env, env): - env.prepend_path('PATH', join_path(self.prefix, 'bin')) + def setup_environment(self, spack_env, run_env): + run_env.prepend_path('PATH', join_path(self.prefix, 'bin')) diff --git a/var/spack/repos/builtin/packages/everytrace/package.py b/var/spack/repos/builtin/packages/everytrace/package.py index d884c7b165..11d2a66bf4 100644 --- a/var/spack/repos/builtin/packages/everytrace/package.py +++ b/var/spack/repos/builtin/packages/everytrace/package.py @@ -47,5 +47,5 @@ class Everytrace(CMakePackage): '-DUSE_MPI=%s' % ('YES' if '+mpi' in spec else 'NO'), '-DUSE_FORTRAN=%s' % ('YES' if '+fortran' in spec else 'NO')] - def setup_environment(self, spack_env, env): - env.prepend_path('PATH', join_path(self.prefix, 'bin')) + def setup_environment(self, spack_env, run_env): + run_env.prepend_path('PATH', join_path(self.prefix, 'bin')) diff --git a/var/spack/repos/builtin/packages/fastqc/package.py b/var/spack/repos/builtin/packages/fastqc/package.py index e2a1b54210..a9e352e101 100644 --- a/var/spack/repos/builtin/packages/fastqc/package.py +++ b/var/spack/repos/builtin/packages/fastqc/package.py @@ -53,8 +53,8 @@ class Fastqc(Package): # In theory the 'run' dependency on 'jdk' above should take # care of this for me. In practice, it does not. - def setup_environment(self, spack_env, env): + def setup_environment(self, spack_env, run_env): """Add <prefix> to the path; the package has a script at the top level. """ - env.prepend_path('PATH', join_path(self.spec['jdk'].prefix, 'bin')) + run_env.prepend_path('PATH', join_path(self.spec['jdk'].prefix, 'bin')) diff --git a/var/spack/repos/builtin/packages/go-bootstrap/package.py b/var/spack/repos/builtin/packages/go-bootstrap/package.py index b497144f2f..8d54486bf5 100644 --- a/var/spack/repos/builtin/packages/go-bootstrap/package.py +++ b/var/spack/repos/builtin/packages/go-bootstrap/package.py @@ -87,7 +87,7 @@ class GoBootstrap(Package): else: shutil.copy2(f, os.path.join(prefix, f)) - def setup_dependent_environment(self, spack_env, run_env, dep_spec): + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): spack_env.set('GOROOT_BOOTSTRAP', self.spec.prefix) def setup_environment(self, spack_env, run_env): diff --git a/var/spack/repos/builtin/packages/go/package.py b/var/spack/repos/builtin/packages/go/package.py index 3a1ca9f1e8..6559e90496 100644 --- a/var/spack/repos/builtin/packages/go/package.py +++ b/var/spack/repos/builtin/packages/go/package.py @@ -114,7 +114,7 @@ class Go(Package): def setup_environment(self, spack_env, run_env): spack_env.set('GOROOT_FINAL', self.spec.prefix) - def setup_dependent_package(self, module, ext_spec): + def setup_dependent_package(self, module, dependent_spec): """Called before go modules' install() methods. In most cases, extensions will only need to set GOPATH and use go:: @@ -127,13 +127,13 @@ class Go(Package): # Add a go command/compiler for extensions module.go = Executable(join_path(self.spec.prefix.bin, 'go')) - def setup_dependent_environment(self, spack_env, run_env, ext_spec): + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): if os.environ.get('GOROOT', False): tty.warn('GOROOT is set, this is not recommended') path_components = [] # Set GOPATH to include paths of dependencies - for d in ext_spec.traverse(): + for d in dependent_spec.traverse(): if d.package.extends(self.spec): path_components.append(d.prefix) @@ -142,4 +142,4 @@ class Go(Package): # Allow packages to find this when using module or dotkit run_env.prepend_path('GOPATH', ':'.join( - [ext_spec.prefix] + path_components)) + [dependent_spec.prefix] + path_components)) diff --git a/var/spack/repos/builtin/packages/intel-mkl/package.py b/var/spack/repos/builtin/packages/intel-mkl/package.py index 6bd4689bc1..5e108a0867 100644 --- a/var/spack/repos/builtin/packages/intel-mkl/package.py +++ b/var/spack/repos/builtin/packages/intel-mkl/package.py @@ -125,5 +125,5 @@ class IntelMkl(IntelInstaller): # set up MKLROOT for everyone using MKL package spack_env.set('MKLROOT', self.prefix) - def setup_environment(self, spack_env, env): - env.set('MKLROOT', self.prefix) + def setup_environment(self, spack_env, run_env): + run_env.set('MKLROOT', self.prefix) diff --git a/var/spack/repos/builtin/packages/lua/package.py b/var/spack/repos/builtin/packages/lua/package.py index 357e2cc03a..a76e7c545b 100644 --- a/var/spack/repos/builtin/packages/lua/package.py +++ b/var/spack/repos/builtin/packages/lua/package.py @@ -86,9 +86,9 @@ class Lua(Package): paths.append(os.path.join(path, '?', 'init.lua')) cpaths.append(os.path.join(path, '?.so')) - def setup_dependent_environment(self, spack_env, run_env, extension_spec): + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): lua_paths = [] - for d in extension_spec.traverse( + for d in dependent_spec.traverse( deptypes=('build', 'run'), deptype_query='run'): if d.package.extends(self.spec): lua_paths.append(os.path.join(d.prefix, self.lua_lib_dir)) @@ -111,9 +111,9 @@ class Lua(Package): # Add LUA to PATH for dependent packages spack_env.prepend_path('PATH', self.prefix.bin) - # For run time environment set only the path for extension_spec and + # For run time environment set only the path for dependent_spec and # prepend it to LUAPATH - if extension_spec.package.extends(self.spec): + if dependent_spec.package.extends(self.spec): run_env.prepend_path('LUA_PATH', ';'.join(lua_patterns), separator=';') run_env.prepend_path('LUA_CPATH', ';'.join(lua_cpatterns), @@ -149,7 +149,7 @@ class Lua(Package): def lua_share_dir(self): return os.path.join('share', 'lua', self.version.up_to(2)) - def setup_dependent_package(self, module, ext_spec): + def setup_dependent_package(self, module, dependent_spec): """ Called before lua modules's install() methods. diff --git a/var/spack/repos/builtin/packages/mpich/package.py b/var/spack/repos/builtin/packages/mpich/package.py index 4c34f3e3a0..09fc683874 100644 --- a/var/spack/repos/builtin/packages/mpich/package.py +++ b/var/spack/repos/builtin/packages/mpich/package.py @@ -69,7 +69,7 @@ class Mpich(AutotoolsPackage): spack_env.set('MPICH_F90', spack_fc) spack_env.set('MPICH_FC', spack_fc) - def setup_dependent_package(self, module, dep_spec): + def setup_dependent_package(self, module, dependent_spec): if 'platform=cray' in self.spec: self.spec.mpicc = spack_cc self.spec.mpicxx = spack_cxx diff --git a/var/spack/repos/builtin/packages/mvapich2/package.py b/var/spack/repos/builtin/packages/mvapich2/package.py index 18f2ebe0bb..de809c4fed 100644 --- a/var/spack/repos/builtin/packages/mvapich2/package.py +++ b/var/spack/repos/builtin/packages/mvapich2/package.py @@ -209,7 +209,7 @@ class Mvapich2(Package): self.version > Version('2.0'): run_env.set('SLURM_MPI_TYPE', 'pmi2') - def setup_dependent_environment(self, spack_env, run_env, extension_spec): + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): spack_env.set('MPICC', join_path(self.prefix.bin, 'mpicc')) spack_env.set('MPICXX', join_path(self.prefix.bin, 'mpicxx')) spack_env.set('MPIF77', join_path(self.prefix.bin, 'mpif77')) @@ -221,7 +221,7 @@ class Mvapich2(Package): spack_env.set('MPICH_F90', spack_fc) spack_env.set('MPICH_FC', spack_fc) - def setup_dependent_package(self, module, dep_spec): + def setup_dependent_package(self, module, dependent_spec): self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') self.spec.mpicxx = join_path(self.prefix.bin, 'mpicxx') self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') diff --git a/var/spack/repos/builtin/packages/octave/package.py b/var/spack/repos/builtin/packages/octave/package.py index fe6ea8ce68..33ed5c8bc3 100644 --- a/var/spack/repos/builtin/packages/octave/package.py +++ b/var/spack/repos/builtin/packages/octave/package.py @@ -88,7 +88,7 @@ class Octave(AutotoolsPackage): depends_on('gnuplot', when='+gnuplot') depends_on('image-magick', when='+magick') depends_on('hdf5', when='+hdf5') - depends_on('jdk', when='+jdk') # TODO: requires Java 6 ? + depends_on('jdk', when='+jdk') # TODO: requires Java 6 ? depends_on('llvm', when='+llvm') # depends_on('opengl', when='+opengl') # TODO: add package depends_on('qhull', when='+qhull') @@ -225,7 +225,7 @@ class Octave(AutotoolsPackage): # Set up environment to make install easy for Octave extensions. # ======================================================================== - def setup_dependent_package(self, module, ext_spec): + def setup_dependent_package(self, module, dependent_spec): """Called before Octave modules' install() methods. In most cases, extensions will only need to have one line: diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index 4d09676fac..27bde1d7aa 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -139,7 +139,7 @@ class Openmpi(AutotoolsPackage): spack_env.set('OMPI_FC', spack_fc) spack_env.set('OMPI_F77', spack_f77) - def setup_dependent_package(self, module, dep_spec): + def setup_dependent_package(self, module, dependent_spec): self.spec.mpicc = join_path(self.prefix.bin, 'mpicc') self.spec.mpicxx = join_path(self.prefix.bin, 'mpic++') self.spec.mpifc = join_path(self.prefix.bin, 'mpif90') diff --git a/var/spack/repos/builtin/packages/plumed/package.py b/var/spack/repos/builtin/packages/plumed/package.py index 69949b0017..80cc1aa66a 100644 --- a/var/spack/repos/builtin/packages/plumed/package.py +++ b/var/spack/repos/builtin/packages/plumed/package.py @@ -99,7 +99,7 @@ class Plumed(AutotoolsPackage): plumed.stdin.write(choice) plumed.wait() - def setup_dependent_package(self, module, ext_spec): + def setup_dependent_package(self, module, dependent_spec): # Make plumed visible from dependent packages module.plumed = Executable(join_path(self.spec.prefix.bin, 'plumed')) diff --git a/var/spack/repos/builtin/packages/py-numpy/package.py b/var/spack/repos/builtin/packages/py-numpy/package.py index 11f6ebb1a5..3571ff1f15 100644 --- a/var/spack/repos/builtin/packages/py-numpy/package.py +++ b/var/spack/repos/builtin/packages/py-numpy/package.py @@ -53,7 +53,7 @@ class PyNumpy(PythonPackage): depends_on('blas', when='+blas') depends_on('lapack', when='+lapack') - def setup_dependent_package(self, module, dep_spec): + def setup_dependent_package(self, module, dependent_spec): python_version = self.spec['python'].version.up_to(2) arch = '{0}-{1}'.format(platform.system().lower(), platform.machine()) diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index f3e2813ae8..15f7f4f987 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -335,7 +335,7 @@ class Python(Package): def site_packages_dir(self): return join_path(self.python_lib_dir, 'site-packages') - def setup_dependent_environment(self, spack_env, run_env, extension_spec): + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): """Set PYTHONPATH to include site-packages dir for the extension and any other python extensions it depends on.""" # The python executable for version 3 may be python3 or python @@ -361,7 +361,7 @@ class Python(Package): spack_env.set('PYTHONHOME', prefix.strip('\n')) python_paths = [] - for d in extension_spec.traverse( + for d in dependent_spec.traverse( deptype=('build', 'run'), deptype_query='run'): if d.package.extends(self.spec): python_paths.append(join_path(d.prefix, @@ -371,12 +371,12 @@ class Python(Package): spack_env.set('PYTHONPATH', pythonpath) # For run time environment set only the path for - # extension_spec and prepend it to PYTHONPATH - if extension_spec.package.extends(self.spec): + # dependent_spec and prepend it to PYTHONPATH + if dependent_spec.package.extends(self.spec): run_env.prepend_path('PYTHONPATH', join_path( - extension_spec.prefix, self.site_packages_dir)) + dependent_spec.prefix, self.site_packages_dir)) - def setup_dependent_package(self, module, ext_spec): + def setup_dependent_package(self, module, dependent_spec): """Called before python modules' install() methods. In most cases, extensions will only need to have one line:: @@ -398,15 +398,15 @@ class Python(Package): module.setup_py.add_default_env(key, value) # Add variables for lib/pythonX.Y and lib/pythonX.Y/site-packages dirs. - module.python_lib_dir = join_path(ext_spec.prefix, + module.python_lib_dir = join_path(dependent_spec.prefix, self.python_lib_dir) - module.python_include_dir = join_path(ext_spec.prefix, + module.python_include_dir = join_path(dependent_spec.prefix, self.python_include_dir) - module.site_packages_dir = join_path(ext_spec.prefix, + module.site_packages_dir = join_path(dependent_spec.prefix, self.site_packages_dir) # Make the site packages directory for extensions - if ext_spec.package.is_extension: + if dependent_spec.package.is_extension: mkdirp(module.site_packages_dir) # ======================================================================== diff --git a/var/spack/repos/builtin/packages/qt/package.py b/var/spack/repos/builtin/packages/qt/package.py index dfe83888e5..b795cd17ab 100644 --- a/var/spack/repos/builtin/packages/qt/package.py +++ b/var/spack/repos/builtin/packages/qt/package.py @@ -128,10 +128,10 @@ class Qt(Package): def setup_environment(self, spack_env, run_env): run_env.set('QTDIR', self.prefix) - def setup_dependent_environment(self, spack_env, run_env, dspec): + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): spack_env.set('QTDIR', self.prefix) - def setup_dependent_package(self, module, ext_spec): + def setup_dependent_package(self, module, dependent_spec): module.qmake = Executable(join_path(self.spec.prefix.bin, 'qmake')) def patch(self): diff --git a/var/spack/repos/builtin/packages/r/package.py b/var/spack/repos/builtin/packages/r/package.py index 842affc4cc..f6ec720eb7 100644 --- a/var/spack/repos/builtin/packages/r/package.py +++ b/var/spack/repos/builtin/packages/r/package.py @@ -149,11 +149,11 @@ class R(AutotoolsPackage): def r_lib_dir(self): return join_path('rlib', 'R', 'library') - def setup_dependent_environment(self, spack_env, run_env, extension_spec): + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): # Set R_LIBS to include the library dir for the # extension and any other R extensions it depends on. r_libs_path = [] - for d in extension_spec.traverse( + for d in dependent_spec.traverse( deptype=('build', 'run'), deptype_query='run'): if d.package.extends(self.spec): r_libs_path.append(join_path(d.prefix, self.r_lib_dir)) @@ -167,11 +167,11 @@ class R(AutotoolsPackage): # determine how many jobs can actually be started. spack_env.set('MAKEFLAGS', '-j{0}'.format(make_jobs)) - # For run time environment set only the path for extension_spec and + # For run time environment set only the path for dependent_spec and # prepend it to R_LIBS - if extension_spec.package.extends(self.spec): + if dependent_spec.package.extends(self.spec): run_env.prepend_path('R_LIBS', join_path( - extension_spec.prefix, self.r_lib_dir)) + dependent_spec.prefix, self.r_lib_dir)) def setup_environment(self, spack_env, run_env): run_env.prepend_path('LIBRARY_PATH', @@ -181,7 +181,7 @@ class R(AutotoolsPackage): run_env.prepend_path('CPATH', join_path(self.prefix, 'rlib', 'R', 'include')) - def setup_dependent_package(self, module, ext_spec): + def setup_dependent_package(self, module, dependent_spec): """Called before R modules' install() methods. In most cases, extensions will only need to have one line: R('CMD', 'INSTALL', '--library={0}'.format(self.module.r_lib_dir), @@ -191,9 +191,9 @@ class R(AutotoolsPackage): module.R = Executable(join_path(self.spec.prefix.bin, 'R')) # Add variable for library directry - module.r_lib_dir = join_path(ext_spec.prefix, self.r_lib_dir) + module.r_lib_dir = join_path(dependent_spec.prefix, self.r_lib_dir) # Make the site packages directory for extensions, if it does not exist # already. - if ext_spec.package.is_extension: + if dependent_spec.package.is_extension: mkdirp(module.r_lib_dir) diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py index 0f66dcebaa..a96d7f6bbc 100644 --- a/var/spack/repos/builtin/packages/root/package.py +++ b/var/spack/repos/builtin/packages/root/package.py @@ -79,7 +79,7 @@ class Root(Package): make() make("install") - def setup_dependent_environment(self, spack_env, run_env, dspec): + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): spack_env.set('ROOTSYS', self.prefix) spack_env.set('ROOT_VERSION', 'v6') spack_env.prepend_path('PYTHONPATH', self.prefix.lib) diff --git a/var/spack/repos/builtin/packages/ruby/package.py b/var/spack/repos/builtin/packages/ruby/package.py index 8dc314c171..728362a18c 100644 --- a/var/spack/repos/builtin/packages/ruby/package.py +++ b/var/spack/repos/builtin/packages/ruby/package.py @@ -52,20 +52,20 @@ class Ruby(Package): make() make("install") - def setup_dependent_environment(self, spack_env, run_env, extension_spec): + def setup_dependent_environment(self, spack_env, run_env, dependent_spec): # TODO: do this only for actual extensions. # Set GEM_PATH to include dependent gem directories ruby_paths = [] - for d in extension_spec.traverse(): + for d in dependent_spec.traverse(): if d.package.extends(self.spec): ruby_paths.append(d.prefix) spack_env.set_path('GEM_PATH', ruby_paths) # The actual installation path for this gem - spack_env.set('GEM_HOME', extension_spec.prefix) + spack_env.set('GEM_HOME', dependent_spec.prefix) - def setup_dependent_package(self, module, ext_spec): + def setup_dependent_package(self, module, dependent_spec): """Called before ruby modules' install() methods. Sets GEM_HOME and GEM_PATH to values appropriate for the package being built. diff --git a/var/spack/repos/builtin/packages/rust/package.py b/var/spack/repos/builtin/packages/rust/package.py index 8a92fca634..4d0e7f52cf 100644 --- a/var/spack/repos/builtin/packages/rust/package.py +++ b/var/spack/repos/builtin/packages/rust/package.py @@ -71,7 +71,7 @@ class Rust(Package): make() make("install") - def setup_dependent_package(self, module, ext_spec): + def setup_dependent_package(self, module, dependent_spec): """ Called before python modules' install() methods. diff --git a/var/spack/repos/builtin/packages/tcl/package.py b/var/spack/repos/builtin/packages/tcl/package.py index 31678caac6..22b300408a 100644 --- a/var/spack/repos/builtin/packages/tcl/package.py +++ b/var/spack/repos/builtin/packages/tcl/package.py @@ -49,11 +49,11 @@ class Tcl(AutotoolsPackage): base_url = 'http://prdownloads.sourceforge.net/tcl' return '{0}/tcl{1}-src.tar.gz'.format(base_url, version) - def setup_environment(self, spack_env, env): + def setup_environment(self, spack_env, run_env): # When using Tkinter from within spack provided python+tk, python # will not be able to find Tcl/Tk unless TCL_LIBRARY is set. - env.set('TCL_LIBRARY', join_path(self.prefix.lib, 'tcl{0}'.format( - self.spec.version.up_to(2)))) + run_env.set('TCL_LIBRARY', join_path(self.prefix.lib, 'tcl{0}'.format( + self.spec.version.up_to(2)))) @run_after('install') def symlink_tclsh(self): |