Workarounds for install errors on Windows (#21890)
1. Forwarding sys.stdin, e.g. use input_multiprocess_fd, gives an error on Windows. Skipping for now 3. subprocess_context needs to serialize for Windows, like it does for Mac. Co-authored-by: lou.lawrence@kitware.com <lou.lawrence@kitware.com> Co-authored-by: John Parent <john.parent@kitware.com>
This commit is contained in:

committed by
Peter Scheibel

parent
81bc00d61f
commit
b60a0eea01
@@ -10,12 +10,19 @@
|
||||
from os import O_NONBLOCK
|
||||
from os.path import basename
|
||||
from subprocess import PIPE, Popen
|
||||
from sys import platform as _platform
|
||||
from sys import stdout
|
||||
|
||||
from llnl.util import tty
|
||||
|
||||
from spack import *
|
||||
|
||||
if _platform != 'win32':
|
||||
from fcntl import F_GETFL, F_SETFL, fcntl
|
||||
from os import O_NONBLOCK, rename
|
||||
else:
|
||||
from os import rename
|
||||
|
||||
re_optline = re.compile(r'\s+[0-9]+\..*\((serial|smpar|dmpar|dm\+sm)\)\s+')
|
||||
re_paroptname = re.compile(r'\((serial|smpar|dmpar|dm\+sm)\)')
|
||||
re_paroptnum = re.compile(r'\s+([0-9]+)\.\s+\(')
|
||||
@@ -27,9 +34,11 @@
|
||||
def setNonBlocking(fd):
|
||||
"""
|
||||
Set the given file descriptor to non-blocking
|
||||
Non-blocking pipes are not supported on windows
|
||||
"""
|
||||
flags = fcntl(fd, F_GETFL) | O_NONBLOCK
|
||||
fcntl(fd, F_SETFL, flags)
|
||||
if _platform != 'win32':
|
||||
flags = fcntl(fd, F_GETFL) | O_NONBLOCK
|
||||
fcntl(fd, F_SETFL, flags)
|
||||
|
||||
|
||||
def collect_platform_options(stdoutpipe):
|
||||
|
Reference in New Issue
Block a user