Proper scons executable on Windows (#34934)

This commit is contained in:
John W. Parent 2023-01-13 22:28:29 -05:00 committed by GitHub
parent 1034b23320
commit 44c69cadf4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,9 +2,12 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import sys
from spack.package import *
is_windows = sys.platform == "win32"
class Scons(PythonPackage):
"""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)
def setup_dependent_package(self, module, dspec):
module.scons = Executable(self.spec.prefix.bin.scons)
if is_windows:
module.scons = Executable(self.spec.prefix.Scripts.scons)
else:
module.scons = Executable(self.spec.prefix.bin.scons)