From: Éric Araujo Date: Thu, 13 Mar 2014 09:59:31 +0000 (-0400) Subject: Merge 3.3 (#11599) X-Git-Tag: v3.4.1rc1~233^2~40^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f1e8c70cf0ba6082e9b35061c310d708d477556a;p=python Merge 3.3 (#11599) --- f1e8c70cf0ba6082e9b35061c310d708d477556a diff --cc Lib/distutils/spawn.py index b1c5a442a5,f66ff93dfb..d9cf950a9b --- a/Lib/distutils/spawn.py +++ b/Lib/distutils/spawn.py @@@ -65,13 -71,41 +71,17 @@@ def _spawn_nt(cmd, search_path=1, verbo 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 diff --cc Misc/NEWS index e69874fd42,253c850b5a..35693c1602 --- a/Misc/NEWS +++ b/Misc/NEWS @@@ -20,9 -13,13 +20,13 @@@ Core and Builtin 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.