Change venv
This commit is contained in:
@@ -10,12 +10,12 @@ import sys
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from distutils.errors import DistutilsPlatformError, DistutilsExecError
|
||||
from distutils.errors import DistutilsExecError
|
||||
from distutils.debug import DEBUG
|
||||
from distutils import log
|
||||
|
||||
|
||||
def spawn(cmd, search_path=1, verbose=0, dry_run=0, env=None):
|
||||
def spawn(cmd, search_path=1, verbose=0, dry_run=0, env=None): # noqa: C901
|
||||
"""Run another program, specified as a command list 'cmd', in a new process.
|
||||
|
||||
'cmd' is just the argument list for the new process, ie.
|
||||
@@ -48,6 +48,7 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0, env=None):
|
||||
|
||||
if sys.platform == 'darwin':
|
||||
from distutils.util import MACOSX_VERSION_VAR, get_macosx_target_ver
|
||||
|
||||
macosx_target_ver = get_macosx_target_ver()
|
||||
if macosx_target_ver:
|
||||
env[MACOSX_VERSION_VAR] = macosx_target_ver
|
||||
@@ -60,13 +61,15 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0, env=None):
|
||||
if not DEBUG:
|
||||
cmd = cmd[0]
|
||||
raise DistutilsExecError(
|
||||
"command %r failed: %s" % (cmd, exc.args[-1])) from exc
|
||||
"command {!r} failed: {}".format(cmd, exc.args[-1])
|
||||
) from exc
|
||||
|
||||
if exitcode:
|
||||
if not DEBUG:
|
||||
cmd = cmd[0]
|
||||
raise DistutilsExecError(
|
||||
"command %r failed with exit code %s" % (cmd, exitcode))
|
||||
"command {!r} failed with exit code {}".format(cmd, exitcode)
|
||||
)
|
||||
|
||||
|
||||
def find_executable(executable, path=None):
|
||||
|
Reference in New Issue
Block a user