summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/build_environment.py11
-rw-r--r--lib/spack/spack/util/executable.py7
2 files changed, 11 insertions, 7 deletions
diff --git a/lib/spack/spack/build_environment.py b/lib/spack/spack/build_environment.py
index 2d0fd2b5e6..5a780e4bd5 100644
--- a/lib/spack/spack/build_environment.py
+++ b/lib/spack/spack/build_environment.py
@@ -136,14 +136,16 @@ class MakeExecutable(Executable):
-j).
"""
- def __init__(self, name, jobs):
- super(MakeExecutable, self).__init__(name)
+ def __init__(self, name, jobs, **kwargs):
+ super(MakeExecutable, self).__init__(name, **kwargs)
self.jobs = jobs
def __call__(self, *args, **kwargs):
"""parallel, and jobs_env from kwargs are swallowed and used here;
remaining arguments are passed through to the superclass.
"""
+ # TODO: figure out how to check if we are using a jobserver-supporting ninja,
+ # the two split ninja packages make this very difficult right now
parallel = should_set_parallel_jobs(jobserver_support=True) and kwargs.pop(
"parallel", self.jobs > 1
)
@@ -533,7 +535,6 @@ def _set_variables_for_single_module(pkg, module):
# TODO: make these build deps that can be installed if not found.
m.make = MakeExecutable("make", jobs)
m.gmake = MakeExecutable("gmake", jobs)
- m.scons = MakeExecutable("scons", jobs)
m.ninja = MakeExecutable("ninja", jobs)
# easy shortcut to os.environ
@@ -543,10 +544,6 @@ def _set_variables_for_single_module(pkg, module):
# Don't use which for this; we want to find it in the current dir.
m.configure = Executable("./configure")
- m.meson = Executable("meson")
- m.cmake = Executable("cmake")
- m.ctest = MakeExecutable("ctest", jobs)
-
if sys.platform == "win32":
m.nmake = Executable("nmake")
# Standard CMake arguments
diff --git a/lib/spack/spack/util/executable.py b/lib/spack/spack/util/executable.py
index a046e26eaa..cd8ddef6de 100644
--- a/lib/spack/spack/util/executable.py
+++ b/lib/spack/spack/util/executable.py
@@ -291,6 +291,13 @@ def which_string(*args, **kwargs):
win_candidates = [name + ext for ext in [".exe", ".bat"]]
candidate_names = [name] if not win_candidates else win_candidates
+ if sys.platform == "win32":
+ new_path = path[:]
+ for p in path:
+ if os.path.basename(p) == "bin":
+ new_path.append(os.path.dirname(p))
+ path = new_path
+
for candidate_name in candidate_names:
if os.path.sep in candidate_name:
exe = os.path.abspath(candidate_name)