summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorMassimiliano Culpo <massimiliano.culpo@gmail.com>2022-03-13 16:51:55 +0100
committerGitHub <noreply@github.com>2022-03-13 11:51:55 -0400
commita6eed4a7c7cbf067c061f982b9ae6c2675c990bc (patch)
tree0db53736cae0155146917748d0fa54e8de827f1a /var
parent406939f485b4f5c09b73f53c9d4ffc4019b8319a (diff)
downloadspack-a6eed4a7c7cbf067c061f982b9ae6c2675c990bc.tar.gz
spack-a6eed4a7c7cbf067c061f982b9ae6c2675c990bc.tar.bz2
spack-a6eed4a7c7cbf067c061f982b9ae6c2675c990bc.tar.xz
spack-a6eed4a7c7cbf067c061f982b9ae6c2675c990bc.zip
Remove "setup_environment" and "setup_dependent_environment" (#29463)
fixes #29446 The new setup_*_environment functions have been falling back to calling the old functions and warn the user since #11115. This commit removes the fallback behavior and any use of: - setup_environment - setup_dependent_environment in the codebase
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin.mock/packages/callpath/package.py4
-rw-r--r--var/spack/repos/builtin.mock/packages/cmake-client/package.py10
-rw-r--r--var/spack/repos/builtin.mock/packages/cmake/package.py8
-rw-r--r--var/spack/repos/builtin.mock/packages/conflict-parent/package.py4
-rw-r--r--var/spack/repos/builtin.mock/packages/conflict/package.py4
-rw-r--r--var/spack/repos/builtin.mock/packages/hash-test1/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/hash-test2/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/hash-test3/package.py2
-rw-r--r--var/spack/repos/builtin.mock/packages/module-path-separator/package.py14
-rw-r--r--var/spack/repos/builtin.mock/packages/mpileaks/package.py4
-rw-r--r--var/spack/repos/builtin/packages/metall/package.py5
-rw-r--r--var/spack/repos/tutorial/packages/elpa/package.py2
-rw-r--r--var/spack/repos/tutorial/packages/mpich/package.py2
13 files changed, 29 insertions, 34 deletions
diff --git a/var/spack/repos/builtin.mock/packages/callpath/package.py b/var/spack/repos/builtin.mock/packages/callpath/package.py
index ac5122fafc..3f3da665a9 100644
--- a/var/spack/repos/builtin.mock/packages/callpath/package.py
+++ b/var/spack/repos/builtin.mock/packages/callpath/package.py
@@ -22,5 +22,5 @@ class Callpath(Package):
make()
make("install")
- def setup_environment(self, senv, renv):
- renv.set('FOOBAR', self.name)
+ def setup_run_environment(self, env):
+ env.set('FOOBAR', self.name)
diff --git a/var/spack/repos/builtin.mock/packages/cmake-client/package.py b/var/spack/repos/builtin.mock/packages/cmake-client/package.py
index 43037eb22e..09b445fd49 100644
--- a/var/spack/repos/builtin.mock/packages/cmake-client/package.py
+++ b/var/spack/repos/builtin.mock/packages/cmake-client/package.py
@@ -54,20 +54,20 @@ class CmakeClient(CMakePackage):
def setup_build_environment(self, spack_env):
spack_cc # Ensure spack module-scope variable is avaiabl
check(from_cmake == "from_cmake",
- "setup_environment couldn't read global set by cmake.")
+ "setup_build_environment couldn't read global set by cmake.")
check(self.spec['cmake'].link_arg == "test link arg",
"link arg on dependency spec not readable from "
- "setup_environment.")
+ "setup_build_environment.")
- def setup_dependent_build_environment(self, spack_env, dspec):
+ def setup_dependent_build_environment(self, env, dependent_spec):
spack_cc # Ensure spack module-scope variable is avaiable
check(from_cmake == "from_cmake",
- "setup_dependent_environment couldn't read global set by cmake.")
+ "setup_dependent_build_environment couldn't read global set by cmake.")
check(self.spec['cmake'].link_arg == "test link arg",
"link arg on dependency spec not readable from "
- "setup_dependent_environment.")
+ "setup_dependent_build_environment.")
def setup_dependent_package(self, module, dspec):
spack_cc # Ensure spack module-scope variable is avaiable
diff --git a/var/spack/repos/builtin.mock/packages/cmake/package.py b/var/spack/repos/builtin.mock/packages/cmake/package.py
index aaa03b22f0..e5dd7057d1 100644
--- a/var/spack/repos/builtin.mock/packages/cmake/package.py
+++ b/var/spack/repos/builtin.mock/packages/cmake/package.py
@@ -22,13 +22,13 @@ class Cmake(Package):
version('3.4.3', '4cb3ff35b2472aae70f542116d616e63',
url='https://cmake.org/files/v3.4/cmake-3.4.3.tar.gz')
- def setup_environment(self, spack_env, run_env):
+ def setup_build_environment(self, env):
spack_cc # Ensure spack module-scope variable is avaiable
- spack_env.set('for_install', 'for_install')
+ env.set('for_install', 'for_install')
- def setup_dependent_environment(self, spack_env, run_env, dspec):
+ def setup_dependent_build_environment(self, env, dependent_spec):
spack_cc # Ensure spack module-scope variable is avaiable
- spack_env.set('from_cmake', 'from_cmake')
+ env.set('from_cmake', 'from_cmake')
def setup_dependent_package(self, module, dspec):
spack_cc # Ensure spack module-scope variable is avaiable
diff --git a/var/spack/repos/builtin.mock/packages/conflict-parent/package.py b/var/spack/repos/builtin.mock/packages/conflict-parent/package.py
index 2cd67ec177..64abfe3525 100644
--- a/var/spack/repos/builtin.mock/packages/conflict-parent/package.py
+++ b/var/spack/repos/builtin.mock/packages/conflict-parent/package.py
@@ -23,5 +23,5 @@ class ConflictParent(Package):
make()
make("install")
- def setup_environment(self, senv, renv):
- renv.set('FOOBAR', self.name)
+ def setup_run_environment(self, env):
+ env.set('FOOBAR', self.name)
diff --git a/var/spack/repos/builtin.mock/packages/conflict/package.py b/var/spack/repos/builtin.mock/packages/conflict/package.py
index b08da7606b..891a6c9ec2 100644
--- a/var/spack/repos/builtin.mock/packages/conflict/package.py
+++ b/var/spack/repos/builtin.mock/packages/conflict/package.py
@@ -23,5 +23,5 @@ class Conflict(Package):
make()
make("install")
- def setup_environment(self, senv, renv):
- renv.set('FOOBAR', self.name)
+ def setup_run_environment(self, env):
+ env.set('FOOBAR', self.name)
diff --git a/var/spack/repos/builtin.mock/packages/hash-test1/package.py b/var/spack/repos/builtin.mock/packages/hash-test1/package.py
index ec9a10091f..22ffae43d1 100644
--- a/var/spack/repos/builtin.mock/packages/hash-test1/package.py
+++ b/var/spack/repos/builtin.mock/packages/hash-test1/package.py
@@ -29,7 +29,7 @@ class HashTest1(Package):
variant('variantx', default=False, description='Test variant X')
variant('varianty', default=False, description='Test variant Y')
- def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
+ def setup_dependent_build_environment(self, env, dependent_spec):
pass
@when('@:1.4')
diff --git a/var/spack/repos/builtin.mock/packages/hash-test2/package.py b/var/spack/repos/builtin.mock/packages/hash-test2/package.py
index 4623fb1134..fffcc22274 100644
--- a/var/spack/repos/builtin.mock/packages/hash-test2/package.py
+++ b/var/spack/repos/builtin.mock/packages/hash-test2/package.py
@@ -25,7 +25,7 @@ class HashTest2(Package):
variant('variantx', default=False, description='Test variant X')
variant('varianty', default=False, description='Test variant Y')
- def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
+ def setup_dependent_build_environment(self, env, dependent_spec):
pass
def install(self, spec, prefix):
diff --git a/var/spack/repos/builtin.mock/packages/hash-test3/package.py b/var/spack/repos/builtin.mock/packages/hash-test3/package.py
index fc97d59284..69e9922b79 100644
--- a/var/spack/repos/builtin.mock/packages/hash-test3/package.py
+++ b/var/spack/repos/builtin.mock/packages/hash-test3/package.py
@@ -24,7 +24,7 @@ class HashTest3(Package):
variant('variantx', default=False, description='Test variant X')
variant('varianty', default=False, description='Test variant Y')
- def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
+ def setup_dependent_build_environment(self, env, dependent_spec):
pass
@when('@:1.4')
diff --git a/var/spack/repos/builtin.mock/packages/module-path-separator/package.py b/var/spack/repos/builtin.mock/packages/module-path-separator/package.py
index 18254babf4..6029853531 100644
--- a/var/spack/repos/builtin.mock/packages/module-path-separator/package.py
+++ b/var/spack/repos/builtin.mock/packages/module-path-separator/package.py
@@ -12,11 +12,11 @@ class ModulePathSeparator(Package):
version(1.0, '0123456789abcdef0123456789abcdef')
- def setup_environment(self, senv, renv):
- renv.append_path("COLON", "foo")
- renv.prepend_path("COLON", "foo")
- renv.remove_path("COLON", "foo")
+ def setup_run_environment(self, env):
+ env.append_path("COLON", "foo")
+ env.prepend_path("COLON", "foo")
+ env.remove_path("COLON", "foo")
- renv.append_path("SEMICOLON", "bar", separator=";")
- renv.prepend_path("SEMICOLON", "bar", separator=";")
- renv.remove_path("SEMICOLON", "bar", separator=";")
+ env.append_path("SEMICOLON", "bar", separator=";")
+ env.prepend_path("SEMICOLON", "bar", separator=";")
+ env.remove_path("SEMICOLON", "bar", separator=";")
diff --git a/var/spack/repos/builtin.mock/packages/mpileaks/package.py b/var/spack/repos/builtin.mock/packages/mpileaks/package.py
index 91ea1980f6..0fe96b419d 100644
--- a/var/spack/repos/builtin.mock/packages/mpileaks/package.py
+++ b/var/spack/repos/builtin.mock/packages/mpileaks/package.py
@@ -30,5 +30,5 @@ class Mpileaks(Package):
touch(prefix.mpileaks)
mkdirp(prefix.man)
- def setup_environment(self, senv, renv):
- renv.set('FOOBAR', self.name)
+ def setup_run_environment(self, env):
+ env.set('FOOBAR', self.name)
diff --git a/var/spack/repos/builtin/packages/metall/package.py b/var/spack/repos/builtin/packages/metall/package.py
index ffad5e2822..9c7ec1644d 100644
--- a/var/spack/repos/builtin/packages/metall/package.py
+++ b/var/spack/repos/builtin/packages/metall/package.py
@@ -45,11 +45,6 @@ class Metall(CMakePackage):
args = ['-DINSTALL_HEADER_ONLY=ON']
return args
- # Set environmental variables for the build step
- # setup_environment() was replaced by setup_build_environment()?
- # (https://github.com/spack/spack/pull/11115)
- # This page has not been updated?
- # https://spack-tutorial.readthedocs.io/en/latest/tutorial_advanced_packaging.html
def setup_build_environment(self, env):
# Configure the directories for test
if self.run_tests:
diff --git a/var/spack/repos/tutorial/packages/elpa/package.py b/var/spack/repos/tutorial/packages/elpa/package.py
index a6c7ea6260..6d7dc82b20 100644
--- a/var/spack/repos/tutorial/packages/elpa/package.py
+++ b/var/spack/repos/tutorial/packages/elpa/package.py
@@ -44,7 +44,7 @@ class Elpa(AutotoolsPackage):
build_directory = 'spack-build'
- def setup_environment(self, spack_env, run_env):
+ def setup_run_environment(self, env):
# TUTORIAL: set the following environment variables:
#
# CC=spec['mpi'].mpicc
diff --git a/var/spack/repos/tutorial/packages/mpich/package.py b/var/spack/repos/tutorial/packages/mpich/package.py
index 10a5381095..b5befe995d 100644
--- a/var/spack/repos/tutorial/packages/mpich/package.py
+++ b/var/spack/repos/tutorial/packages/mpich/package.py
@@ -75,7 +75,7 @@ spack package at this time.''',
conflicts('netmod=mxm', when='@:3.1.3')
conflicts('netmod=tcp', when='device=ch4')
- def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
+ def setup_dependent_build_environment(self, env, dependent_spec):
# TUTORIAL: set the following variables for dependents:
#
# MPICC=join_path(self.prefix.bin, 'mpicc')