summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authormarkus-ferrell <116021216+markus-ferrell@users.noreply.github.com>2023-08-14 19:29:12 -0400
committerGitHub <noreply@github.com>2023-08-14 23:29:12 +0000
commitc202a045e69ea2968ddff41008518cc427d8ddac (patch)
tree0589c387ec27ba8b6b02cd308463157c6ab89e1c /var
parent843e1e80f02bf89543acbb4bfdc6266413adc212 (diff)
downloadspack-c202a045e69ea2968ddff41008518cc427d8ddac.tar.gz
spack-c202a045e69ea2968ddff41008518cc427d8ddac.tar.bz2
spack-c202a045e69ea2968ddff41008518cc427d8ddac.tar.xz
spack-c202a045e69ea2968ddff41008518cc427d8ddac.zip
Windows: executable/path handling (#37762)
Windows executable paths can have spaces in them, which was leading to errors when constructing Executable objects: the parser was intended to handle cases where users could provide an executable along with one or more space-delimited arguments. * Executable now assumes that it is constructed with a string argument that represents the path to the executable, but no additional arguments. * Invocations of Executable.__init__ that depended on this have been updated (this includes the core, tests, and one instance of builtin repository package). * The error handling for failed invocations of Executable.__call__ now includes a check for whether the executable name/path contains a space, to help users debug cases where they (now incorrectly) concatenate the path and the arguments.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin.mock/packages/cmake-client/package.py2
-rw-r--r--var/spack/repos/builtin/packages/oommf/package.py12
2 files changed, 7 insertions, 7 deletions
diff --git a/var/spack/repos/builtin.mock/packages/cmake-client/package.py b/var/spack/repos/builtin.mock/packages/cmake-client/package.py
index 2ce5a98dd1..a0694f2d6d 100644
--- a/var/spack/repos/builtin.mock/packages/cmake-client/package.py
+++ b/var/spack/repos/builtin.mock/packages/cmake-client/package.py
@@ -109,7 +109,7 @@ class CmakeClient(CMakePackage):
print(cmake)
print(cmake.exe)
check(
- cmake.exe[0].startswith(spec["cmake"].prefix.bin),
+ cmake.path.startswith(spec["cmake"].prefix.bin),
"Wrong cmake was in environment: %s" % cmake,
)
diff --git a/var/spack/repos/builtin/packages/oommf/package.py b/var/spack/repos/builtin/packages/oommf/package.py
index f7127f073e..a3a4a6aeac 100644
--- a/var/spack/repos/builtin/packages/oommf/package.py
+++ b/var/spack/repos/builtin/packages/oommf/package.py
@@ -168,15 +168,15 @@ class Oommf(Package):
def configure(self, spec, prefix):
# change into directory with source code
with working_dir(self.get_oommf_source_root()):
- configure = Executable("./oommf.tcl pimake distclean")
- configure()
- configure2 = Executable("./oommf.tcl pimake upgrade")
- configure2()
+ configure = Executable("./oommf.tcl")
+ configure("pimake", "distclean")
+ configure2 = Executable("./oommf.tcl")
+ configure2("pimake", "upgrade")
def build(self, spec, prefix):
with working_dir(self.get_oommf_source_root()):
- make = Executable("./oommf.tcl pimake ")
- make()
+ make = Executable("./oommf.tcl")
+ make("pimake")
def install(self, spec, prefix):
# keep a copy of all the tcl files and everything oommf created.