From 529c659bd07d2842886c90e66b122b833f3a9bf3 Mon Sep 17 00:00:00 2001 From: cedricchevalier19 Date: Fri, 26 Jun 2020 21:06:43 +0200 Subject: First fix for SPACK_DEPENDENCIES problem when doing setup (#10715) * First fix for SPACK_DEPENDENCIES problem when doing setup * Get rid of transitive include path in setup. * Export SPACK_INCLUDE_DIRS into spconfig.py --- lib/spack/spack/cmd/setup.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'lib') diff --git a/lib/spack/spack/cmd/setup.py b/lib/spack/spack/cmd/setup.py index 246e3b4275..1d98e3ec4e 100644 --- a/lib/spack/spack/cmd/setup.py +++ b/lib/spack/spack/cmd/setup.py @@ -39,13 +39,6 @@ def setup_parser(subparser): arguments.add_common_arguments(cd_group, ['clean', 'dirty']) -def spack_transitive_include_path(): - return ';'.join( - os.path.join(dep, 'include') - for dep in os.environ['SPACK_DEPENDENCIES'].split(os.pathsep) - ) - - def write_spconfig(package, dirty): # Set-up the environment spack.build_environment.setup_package(package, dirty) @@ -57,8 +50,8 @@ def write_spconfig(package, dirty): paths = os.environ['PATH'].split(':') paths = [item for item in paths if 'spack/env' not in item] env['PATH'] = ':'.join(paths) - env['SPACK_TRANSITIVE_INCLUDE_PATH'] = spack_transitive_include_path() env['CMAKE_PREFIX_PATH'] = os.environ['CMAKE_PREFIX_PATH'] + env['SPACK_INCLUDE_DIRS'] = os.environ['SPACK_INCLUDE_DIRS'] env['CC'] = os.environ['SPACK_CC'] env['CXX'] = os.environ['SPACK_CXX'] env['FC'] = os.environ['SPACK_FC'] @@ -84,7 +77,7 @@ env = dict(os.environ) if name.find('PATH') < 0: fout.write('env[%s] = %s\n' % (repr(name), repr(val))) else: - if name == 'SPACK_TRANSITIVE_INCLUDE_PATH': + if name == 'SPACK_INCLUDE_DIRS': sep = ';' else: sep = ':' -- cgit v1.2.3-70-g09d2