Proper scons executable on Windows (#34934)
This commit is contained in:
		| @@ -2,9 +2,12 @@ | |||||||
| # Spack Project Developers. See the top-level COPYRIGHT file for details. | # Spack Project Developers. See the top-level COPYRIGHT file for details. | ||||||
| # | # | ||||||
| # SPDX-License-Identifier: (Apache-2.0 OR MIT) | # SPDX-License-Identifier: (Apache-2.0 OR MIT) | ||||||
|  | import sys | ||||||
| 
 | 
 | ||||||
| from spack.package import * | from spack.package import * | ||||||
| 
 | 
 | ||||||
|  | is_windows = sys.platform == "win32" | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| class Scons(PythonPackage): | class Scons(PythonPackage): | ||||||
|     """SCons is a software construction tool""" |     """SCons is a software construction tool""" | ||||||
| @@ -56,4 +59,7 @@ def setup_dependent_run_environment(self, env, dependent_spec): | |||||||
|         env.prepend_path("PYTHONPATH", self.prefix.lib.scons) |         env.prepend_path("PYTHONPATH", self.prefix.lib.scons) | ||||||
| 
 | 
 | ||||||
|     def setup_dependent_package(self, module, dspec): |     def setup_dependent_package(self, module, dspec): | ||||||
|  |         if is_windows: | ||||||
|  |             module.scons = Executable(self.spec.prefix.Scripts.scons) | ||||||
|  |         else: | ||||||
|             module.scons = Executable(self.spec.prefix.bin.scons) |             module.scons = Executable(self.spec.prefix.bin.scons) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 John W. Parent
					John W. Parent