rc = os.spawnv(os.P_WAIT, executable, cmd)
except OSError as exc:
# this seems to happen when the command isn't found
+ if not DEBUG:
+ cmd = executable
raise DistutilsExecError(
- "command '%s' failed: %s" % (cmd[0], exc.args[-1]))
+ "command %r failed: %s" % (cmd, exc.args[-1]))
if rc != 0:
# and this reflects the command running but failing
+ if not DEBUG:
+ cmd = executable
raise DistutilsExecError(
- "command '%s' failed with exit status %d" % (cmd[0], rc))
+ "command %r failed with exit status %d" % (cmd, rc))
-def _spawn_os2(cmd, search_path=1, verbose=0, dry_run=0):
- executable = cmd[0]
- if search_path:
- # either we find one or it stays the same
- executable = find_executable(executable) or executable
- log.info(' '.join([executable] + cmd[1:]))
- if not dry_run:
- # spawnv for OS/2 EMX requires a full path to the .exe
- try:
- rc = os.spawnv(os.P_WAIT, executable, cmd)
- except OSError as exc:
- # this seems to happen when the command isn't found
- if not DEBUG:
- cmd = executable
- raise DistutilsExecError(
- "command %r failed: %s" % (cmd, exc.args[-1]))
- if rc != 0:
- # and this reflects the command running but failing
- if not DEBUG:
- cmd = executable
- log.debug("command %r failed with exit status %d" % (cmd, rc))
- raise DistutilsExecError(
- "command %r failed with exit status %d" % (cmd, rc))
-
if sys.platform == 'darwin':
from distutils import sysconfig
_cfg_target = None
Library
-------
-- Issue #20875: Prevent possible gzip "'read' is not defined" NameError.
- Patch by Claudiu Popa.
+- Issue #19157: Include the broadcast address in the usuable hosts for IPv6
+ in ipaddress.
+ - Issue #11599: When an external command (e.g. compiler) fails, distutils now
+ prints out the whole command line (instead of just the command name) if the
+ environment variable DISTUTILS_DEBUG is set.
+
- Issue #4931: distutils should not produce unhelpful "error: None" messages
anymore. distutils.util.grok_environment_error is kept but doc-deprecated.