From ab98ef17659c413a2eede4106574400a6e4e0ec5 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Fri, 29 Nov 2019 15:00:44 -0600 Subject: Mass conversion of setup_(dependent_)?environment (#13924) * Mass conversion of setup_(dependent_)?environment * prefix -> self.prefix --- lib/spack/spack/build_systems/intel.py | 4 ++-- lib/spack/spack/build_systems/octave.py | 9 ++++----- lib/spack/spack/test/package_sanity.py | 7 ++++--- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'lib') diff --git a/lib/spack/spack/build_systems/intel.py b/lib/spack/spack/build_systems/intel.py index 9b32c20d01..0ec81f3537 100644 --- a/lib/spack/spack/build_systems/intel.py +++ b/lib/spack/spack/build_systems/intel.py @@ -942,7 +942,7 @@ class IntelPackage(PackageBase): for key, value in wrapper_vars.items(): env.set(key, value) - debug_print("adding to spack_env:", wrapper_vars) + debug_print("adding to build env:", wrapper_vars) # --------------------------------------------------------------------- # General support for child packages @@ -1054,7 +1054,7 @@ class IntelPackage(PackageBase): env.append_path('SPACK_COMPILER_EXTRA_RPATHS', env_mods['SPACK_COMPILER_EXTRA_RPATHS']) - debug_print("adding/modifying spack_env:", env_mods) + debug_print("adding/modifying build env:", env_mods) if '+mpi' in self.spec or self.provides('mpi'): if compilers_of_client: diff --git a/lib/spack/spack/build_systems/octave.py b/lib/spack/spack/build_systems/octave.py index 677e623bd6..5535cd4d9f 100644 --- a/lib/spack/spack/build_systems/octave.py +++ b/lib/spack/spack/build_systems/octave.py @@ -29,12 +29,11 @@ class OctavePackage(PackageBase): extends('octave') depends_on('octave', type=('build', 'run')) - def setup_environment(self, spack_env, run_env): - """Set up the compile and runtime environments for a package.""" + def setup_build_environment(self, env): # octave does not like those environment variables to be set: - spack_env.unset('CC') - spack_env.unset('CXX') - spack_env.unset('FC') + env.unset('CC') + env.unset('CXX') + env.unset('FC') def install(self, spec, prefix): """Install the package from the archive file""" diff --git a/lib/spack/spack/test/package_sanity.py b/lib/spack/spack/test/package_sanity.py index bbf63881a7..e7ac1563eb 100644 --- a/lib/spack/spack/test/package_sanity.py +++ b/lib/spack/spack/test/package_sanity.py @@ -141,7 +141,6 @@ def test_all_packages_use_sha256_checksums(): assert [] == errors -@pytest.mark.xfail def test_api_for_build_and_run_environment(): """Ensure that every package uses the correct API to set build and run environment, and not the old one. @@ -154,7 +153,7 @@ def test_api_for_build_and_run_environment(): failing.append(pkg) msg = ('there are {0} packages using the old API to set build ' - 'and run environment [{1}], for further information see' + 'and run environment [{1}], for further information see ' 'https://github.com/spack/spack/pull/11115') assert not failing, msg.format( len(failing), ','.join(x.name for x in failing) @@ -182,7 +181,9 @@ def test_prs_update_old_api(): if failed: failing.append(name) - msg = 'there are {0} packages still using old APIs in this PR [{1}]' + msg = ('there are {0} packages using the old API to set build ' + 'and run environment [{1}], for further information see ' + 'https://github.com/spack/spack/pull/11115') assert not failing, msg.format( len(failing), ','.join(failing) ) -- cgit v1.2.3-70-g09d2